!(function (e) {
	"function" == typeof define && define.amd ? define(e) : e();
})(function () {
	"use strict";
	window.__JSSDK_VERSION__ = { SDKVersion: "3.1.2", SDKCDNVersion: "1.5.21", CommitHash: "" };
	let e =
		"undefined" != typeof globalThis
			? globalThis
			: "undefined" != typeof window
				? window
				: "undefined" != typeof global
					? global
					: "undefined" != typeof self
						? self
						: {};
	function t(e) {
		return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
	}
	function n(e, t, n) {
		return (
			e(
				(n = {
					path: t,
					exports: {},
					require: function (e, t) {
						return (function () {
							throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
						})(null == t && n.path);
					}
				}),
				n.exports
			),
			n.exports
		);
	}
	let r = t(
		n(function (e) {
			function t(e, t, n, r, i, o, a) {
				try {
					var s = e[o](a),
						c = s.value;
				} catch (e) {
					return void n(e);
				}
				s.done ? t(c) : Promise.resolve(c).then(r, i);
			}
			(e.exports = function (e) {
				return function () {
					let n = this,
						r = arguments;
					return new Promise(function (i, o) {
						let a = e.apply(n, r);
						function s(e) {
							t(a, i, o, s, c, "next", e);
						}
						function c(e) {
							t(a, i, o, s, c, "throw", e);
						}
						s(void 0);
					});
				};
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		})
	),
		i = n(function (e) {
			function t(n) {
				return (
					(e.exports = t =
						"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
							? function (e) {
								return typeof e;
							}
							: function (e) {
								return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype
									? "symbol"
									: typeof e;
							}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports),
					t(n)
				);
			}
			(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
		}),
		o = n(function (e) {
			let t = i.default;
			function n() {
				/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
				(e.exports = n =
					function () {
						return r;
					}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
				var r = {},
					i = Object.prototype,
					o = i.hasOwnProperty,
					a = "function" == typeof Symbol ? Symbol : {},
					s = a.iterator || "@@iterator",
					c = a.asyncIterator || "@@asyncIterator",
					u = a.toStringTag || "@@toStringTag";
				function l(e, t, n) {
					return Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }), e[t];
				}
				try {
					l({}, "");
				} catch (e) {
					l = function (e, t, n) {
						return (e[t] = n);
					};
				}
				function f(e, t, n, r) {
					let i = t && t.prototype instanceof p ? t : p,
						o = Object.create(i.prototype),
						a = new M(r || []);
					return (
						(o._invoke = (function (e, t, n) {
							let r = "suspendedStart";
							return function (i, o) {
								if ("executing" === r) throw new Error("Generator is already running");
								if ("completed" === r) {
									if ("throw" === i) throw o;
									return I();
								}
								for (n.method = i, n.arg = o; ;) {
									let a = n.delegate;
									if (a) {
										let s = S(a, n);
										if (s) {
											if (s === h) continue;
											return s;
										}
									}
									if ("next" === n.method) n.sent = n._sent = n.arg;
									else if ("throw" === n.method) {
										if ("suspendedStart" === r) throw ((r = "completed"), n.arg);
										n.dispatchException(n.arg);
									} else "return" === n.method && n.abrupt("return", n.arg);
									r = "executing";
									let c = d(e, t, n);
									if ("normal" === c.type) {
										if (((r = n.done ? "completed" : "suspendedYield"), c.arg === h)) continue;
										return { value: c.arg, done: n.done };
									}
									"throw" === c.type && ((r = "completed"), (n.method = "throw"), (n.arg = c.arg));
								}
							};
						})(e, n, a)),
						o
					);
				}
				function d(e, t, n) {
					try {
						return { type: "normal", arg: e.call(t, n) };
					} catch (e) {
						return { type: "throw", arg: e };
					}
				}
				r.wrap = f;
				var h = {};
				function p() { }
				function v() { }
				function g() { }
				let m = {};
				l(m, s, function () {
					return this;
				});
				let y = Object.getPrototypeOf,
					k = y && y(y(E([])));
				k && k !== i && o.call(k, s) && (m = k);
				let w = (g.prototype = p.prototype = Object.create(m));
				function b(e) {
					["next", "throw", "return"].forEach(function (t) {
						l(e, t, function (e) {
							return this._invoke(t, e);
						});
					});
				}
				function _(e, n) {
					function r(i, a, s, c) {
						let u = d(e[i], e, a);
						if ("throw" !== u.type) {
							let l = u.arg,
								f = l.value;
							return f && "object" == t(f) && o.call(f, "__await")
								? n.resolve(f.__await).then(
									function (e) {
										r("next", e, s, c);
									},
									function (e) {
										r("throw", e, s, c);
									}
								)
								: n.resolve(f).then(
									function (e) {
										(l.value = e), s(l);
									},
									function (e) {
										return r("throw", e, s, c);
									}
								);
						}
						c(u.arg);
					}
					let i;
					this._invoke = function (e, t) {
						function o() {
							return new n(function (n, i) {
								r(e, t, n, i);
							});
						}
						return (i = i ? i.then(o, o) : o());
					};
				}
				function S(e, t) {
					let n = e.iterator[t.method];
					if (void 0 === n) {
						if (((t.delegate = null), "throw" === t.method)) {
							if (e.iterator.return && ((t.method = "return"), (t.arg = void 0), S(e, t), "throw" === t.method)) return h;
							(t.method = "throw"), (t.arg = new TypeError("The iterator does not provide a 'throw' method"));
						}
						return h;
					}
					let r = d(n, e.iterator, t.arg);
					if ("throw" === r.type) return (t.method = "throw"), (t.arg = r.arg), (t.delegate = null), h;
					let i = r.arg;
					return i
						? i.done
							? ((t[e.resultName] = i.value),
								(t.next = e.nextLoc),
								"return" !== t.method && ((t.method = "next"), (t.arg = void 0)),
								(t.delegate = null),
								h)
							: i
						: ((t.method = "throw"), (t.arg = new TypeError("iterator result is not an object")), (t.delegate = null), h);
				}
				function C(e) {
					let t = { tryLoc: e[0] };
					1 in e && (t.catchLoc = e[1]), 2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])), this.tryEntries.push(t);
				}
				function A(e) {
					let t = e.completion || {};
					(t.type = "normal"), delete t.arg, (e.completion = t);
				}
				function M(e) {
					(this.tryEntries = [{ tryLoc: "root" }]), e.forEach(C, this), this.reset(!0);
				}
				function E(e) {
					if (e) {
						let t = e[s];
						if (t) return t.call(e);
						if ("function" == typeof e.next) return e;
						if (!isNaN(e.length)) {
							let n = -1,
								r = function t() {
									for (; ++n < e.length;) if (o.call(e, n)) return (t.value = e[n]), (t.done = !1), t;
									return (t.value = void 0), (t.done = !0), t;
								};
							return (r.next = r);
						}
					}
					return { next: I };
				}
				function I() {
					return { value: void 0, done: !0 };
				}
				return (
					(v.prototype = g),
					l(w, "constructor", g),
					l(g, "constructor", v),
					(v.displayName = l(g, u, "GeneratorFunction")),
					(r.isGeneratorFunction = function (e) {
						let t = "function" == typeof e && e.constructor;
						return !!t && (t === v || "GeneratorFunction" === (t.displayName || t.name));
					}),
					(r.mark = function (e) {
						return (
							Object.setPrototypeOf ? Object.setPrototypeOf(e, g) : ((e.__proto__ = g), l(e, u, "GeneratorFunction")),
							(e.prototype = Object.create(w)),
							e
						);
					}),
					(r.awrap = function (e) {
						return { __await: e };
					}),
					b(_.prototype),
					l(_.prototype, c, function () {
						return this;
					}),
					(r.AsyncIterator = _),
					(r.async = function (e, t, n, i, o) {
						void 0 === o && (o = Promise);
						let a = new _(f(e, t, n, i), o);
						return r.isGeneratorFunction(t)
							? a
							: a.next().then(function (e) {
								return e.done ? e.value : a.next();
							});
					}),
					b(w),
					l(w, u, "Generator"),
					l(w, s, function () {
						return this;
					}),
					l(w, "toString", function () {
						return "[object Generator]";
					}),
					(r.keys = function (e) {
						let t = [];
						for (let n in e) t.push(n);
						return (
							t.reverse(),
							function n() {
								for (; t.length;) {
									let r = t.pop();
									if (r in e) return (n.value = r), (n.done = !1), n;
								}
								return (n.done = !0), n;
							}
						);
					}),
					(r.values = E),
					(M.prototype = {
						constructor: M,
						reset: function (e) {
							if (
								((this.prev = 0),
									(this.next = 0),
									(this.sent = this._sent = void 0),
									(this.done = !1),
									(this.delegate = null),
									(this.method = "next"),
									(this.arg = void 0),
									this.tryEntries.forEach(A),
									!e)
							)
								for (let t in this) "t" === t.charAt(0) && o.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0);
						},
						stop: function () {
							this.done = !0;
							let e = this.tryEntries[0].completion;
							if ("throw" === e.type) throw e.arg;
							return this.rval;
						},
						dispatchException: function (e) {
							if (this.done) throw e;
							let t = this;
							function n(n, r) {
								return (a.type = "throw"), (a.arg = e), (t.next = n), r && ((t.method = "next"), (t.arg = void 0)), !!r;
							}
							for (let r = this.tryEntries.length - 1; r >= 0; --r) {
								var i = this.tryEntries[r],
									a = i.completion;
								if ("root" === i.tryLoc) return n("end");
								if (i.tryLoc <= this.prev) {
									let s = o.call(i, "catchLoc"),
										c = o.call(i, "finallyLoc");
									if (s && c) {
										if (this.prev < i.catchLoc) return n(i.catchLoc, !0);
										if (this.prev < i.finallyLoc) return n(i.finallyLoc);
									} else if (s) {
										if (this.prev < i.catchLoc) return n(i.catchLoc, !0);
									} else {
										if (!c) throw new Error("try statement without catch or finally");
										if (this.prev < i.finallyLoc) return n(i.finallyLoc);
									}
								}
							}
						},
						abrupt: function (e, t) {
							for (let n = this.tryEntries.length - 1; n >= 0; --n) {
								let r = this.tryEntries[n];
								if (r.tryLoc <= this.prev && o.call(r, "finallyLoc") && this.prev < r.finallyLoc) {
									var i = r;
									break;
								}
							}
							i && ("break" === e || "continue" === e) && i.tryLoc <= t && t <= i.finallyLoc && (i = null);
							let a = i ? i.completion : {};
							return (a.type = e), (a.arg = t), i ? ((this.method = "next"), (this.next = i.finallyLoc), h) : this.complete(a);
						},
						complete: function (e, t) {
							if ("throw" === e.type) throw e.arg;
							return (
								"break" === e.type || "continue" === e.type
									? (this.next = e.arg)
									: "return" === e.type
										? ((this.rval = this.arg = e.arg), (this.method = "return"), (this.next = "end"))
										: "normal" === e.type && t && (this.next = t),
								h
							);
						},
						finish: function (e) {
							for (let t = this.tryEntries.length - 1; t >= 0; --t) {
								let n = this.tryEntries[t];
								if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), A(n), h;
							}
						},
						catch: function (e) {
							for (let t = this.tryEntries.length - 1; t >= 0; --t) {
								let n = this.tryEntries[t];
								if (n.tryLoc === e) {
									let r = n.completion;
									if ("throw" === r.type) {
										var i = r.arg;
										A(n);
									}
									return i;
								}
							}
							throw new Error("illegal catch attempt");
						},
						delegateYield: function (e, t, n) {
							return (
								(this.delegate = { iterator: E(e), resultName: t, nextLoc: n }), "next" === this.method && (this.arg = void 0), h
							);
						}
					}),
					r
				);
			}
			(e.exports = n), (e.exports.__esModule = !0), (e.exports.default = e.exports);
		})(),
		a = o;
	try {
		regeneratorRuntime = o;
	} catch (e) {
		"object" == typeof globalThis ? (globalThis.regeneratorRuntime = o) : Function("r", "regeneratorRuntime = r")(o);
	}
	let s,
		c,
		u,
		l = t(
			n(function (e) {
				function t(e, t) {
					for (let n = 0; n < t.length; n++) {
						let r = t[n];
						(r.enumerable = r.enumerable || !1),
							(r.configurable = !0),
							"value" in r && (r.writable = !0),
							Object.defineProperty(e, r.key, r);
					}
				}
				(e.exports = function (e, n, r) {
					return n && t(e.prototype, n), r && t(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		),
		f = n(function (e) {
			(e.exports = function (e, t) {
				(null == t || t > e.length) && (t = e.length);
				for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
				return r;
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		d = n(function (e) {
			(e.exports = function (e, t) {
				if (e) {
					if ("string" == typeof e) return f(e, t);
					let n = Object.prototype.toString.call(e).slice(8, -1);
					return (
						"Object" === n && e.constructor && (n = e.constructor.name),
						"Map" === n || "Set" === n
							? Array.from(e)
							: "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
								? f(e, t)
								: void 0
					);
				}
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		h = t(
			n(function (e) {
				(e.exports = function (e, t) {
					let n = ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"];
					if (n) return (n = n.call(e)).next.bind(n);
					if (Array.isArray(e) || (n = d(e)) || (t && e && "number" == typeof e.length)) {
						n && (e = n);
						let r = 0;
						return function () {
							return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] };
						};
					}
					throw new TypeError(
						"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
					);
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		),
		p = t(
			n(function (e) {
				(e.exports = function (e, t) {
					if (null == e) return {};
					let n,
						r,
						i = {},
						o = Object.keys(e);
					for (r = 0; r < o.length; r++) (n = o[r]), t.indexOf(n) >= 0 || (i[n] = e[n]);
					return i;
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		);
	!(function (e) {
		(e.userCaptureScreenObserved = "userCaptureScreenObserved"),
			(e.onWatermarkChangeObserved = "onWatermarkChange"),
			(e.onDownloadTaskStateChange = "onDownloadTaskStateChange"),
			(e.nfcFoundDevice = "nfcFoundDevice");
	})(s || (s = {})),
		(function (e) {
			(e.IOS = "ios"), (e.ANDROID = "android"), (e.MAC = "mac"), (e.WINDOWS = "windows");
		})(c || (c = {})),
		(function (e) {
			(e.CDN = "cdn"), (e.NPM = "npm"), (e.DEV = "dev");
		})(u || (u = {}));
	let v = function (e) {
		let t;
		if (e.includes("Lark") || e.includes("Feishu"))
			return null ==
				(t = e.match(/(lark|feishu|lark-staging|feishu-staging|lark-prerelease|feishu-prerelease|lark-oversea)\/([\d.]+)/i))
				? void 0
				: t[2];
	},
		g = {
			versions: (function () {
				let e = navigator.userAgent,
					t = navigator.platform,
					n = /(Android|iPhone|iPad|iPod|iOS)/i.test(e),
					r = v(e),
					i = e.includes("Lark") || e.includes("Feishu"),
					o = r && w(r, "3.46.0") < 0,
					a = r && w(r, "3.46.0") >= 0 && e.includes("WebApp");
				return {
					trident: e.includes("Trident"),
					presto: e.includes("Presto"),
					webKit: e.includes("AppleWebKit"),
					gecko: e.includes("Gecko") && !e.includes("KHTML"),
					mobile: !!e.match(/AppleWebKit.*Mobile.*/) || !!e.match(/AppleWebKit/),
					ios: !!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
					android: e.includes("Android") || e.includes("Linux"),
					iPhone: e.includes("iPhone") || e.includes("Mac"),
					iPad: e.includes("iPad"),
					webApp: !e.includes("Safari"),
					PCFeishu: !n && i && (o || a),
					mobileFeishu: n && i,
					larkVersion: v(e),
					mac: t.includes("Mac"),
					win: t.includes("Win")
				};
			})()
		};
	function m() {
		return new Promise(function (e) {
			let t = 0;
			!(function n() {
				let r, i;
				(null == (r = window.webkit) || null == (i = r.messageHandlers) ? void 0 : i.invoke) ||
					window.WebViewJavascriptBridge ||
					window.LarkWebViewJavaScriptBridge ||
					t > 100
					? e(0)
					: (setTimeout(n, 10 + t), t++);
			})();
		});
	}
	function y(e) {
		return Object.prototype.toString.call(e).slice(8, -1);
	}
	function k(e, t) {
		t ? console.warn("【H5-JS-SDK】: " + e) : console.error("【H5-JS-SDK】: " + e);
	}
	function w(e, t) {
		for (
			let n = e
				.replace(/-\d*$/, "")
				.split(".")
				.map(function (e) {
					return +e;
				}),
			r = t
				.replace(/-\d*$/, "")
				.split(".")
				.map(function (e) {
					return +e;
				}),
			i = 0;
			i < n.length;
			i++
		) {
			if (n[i] > r[i]) return 1;
			if (n[i] < r[i]) return -1;
		}
		return 0;
	}
	let b = n(function (e) {
		function t(n, r) {
			return (
				(e.exports = t =
					Object.setPrototypeOf
						? Object.setPrototypeOf.bind()
						: function (e, t) {
							return (e.__proto__ = t), e;
						}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports),
				t(n, r)
			);
		}
		(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
	}),
		_ = t(
			n(function (e) {
				(e.exports = function (e, t) {
					if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
					(e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } })),
						Object.defineProperty(e, "prototype", { writable: !1 }),
						t && b(e, t);
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		),
		S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
		C = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/,
		A = window,
		M =
			A.btoa ||
			function (e) {
				for (var t, n, r, i, o = "", a = 0, s = (e = String(e)).length % 3; a < e.length;) {
					if ((n = e.charCodeAt(a++)) > 255 || (r = e.charCodeAt(a++)) > 255 || (i = e.charCodeAt(a++)) > 255)
						throw new TypeError(
							'Failed to execute "btoa" on "Window": The string ' +
							e +
							" to be encoded contains characters outside of the Latin1 range."
						);
					o +=
						S.charAt(((t = (n << 16) | (r << 8) | i) >> 18) & 63) +
						S.charAt((t >> 12) & 63) +
						S.charAt((t >> 6) & 63) +
						S.charAt(63 & t);
				}
				return s ? o.slice(0, s - 3) + "===".substring(s) : o;
			},
		E =
			A.atob ||
			function (e) {
				if (((e = String(e).replace(/[\t\n\f\r ]+/g, "")), !C.test(e)))
					throw new TypeError(
						'Failed to execute "atob" on "Window": The string ' + e + " to be decoded is not correctly encoded."
					);
				let t;
				e += "==".slice(2 - (3 & e.length));
				for (var n, r, i = "", o = 0; o < e.length;)
					(t =
						(S.indexOf(e.charAt(o++)) << 18) |
						(S.indexOf(e.charAt(o++)) << 12) |
						((n = S.indexOf(e.charAt(o++))) << 6) |
						(r = S.indexOf(e.charAt(o++)))),
						(i +=
							64 === n
								? String.fromCharCode((t >> 16) & 255)
								: 64 === r
									? String.fromCharCode((t >> 16) & 255, (t >> 8) & 255)
									: String.fromCharCode((t >> 16) & 255, (t >> 8) & 255, 255 & t));
				return i;
			};
	function I(e) {
		for (var t = "", n = new Uint8Array(e), r = n.byteLength, i = 0; i < r; i++) t += String.fromCharCode(n[i]);
		return M(t);
	}
	function T(e, t, n) {
		return void 0 === n && (n = !0), n ? { key: e, value: t } : { key: e, base64: I(t) };
	}
	function x(e) {
		if (null != e) {
			if ("base64" in e)
				return (function (e) {
					for (var t = E(e), n = t.length, r = new Uint8Array(n), i = 0; i < n; i++) r[i] = t.charCodeAt(i);
					return r.buffer;
				})(e.base64);
			if ("value" in e) return e.value;
		}
	}
	function P(e) {
		return function (t) {
			return Object.prototype.toString.call(t).toLowerCase() === ("[object " + e + "]").toLowerCase();
		};
	}
	let L = function (e, t) {
		if ((void 0 === t && (t = !0), !P("Object")(e))) return e;
		let n = [];
		for (let r in e)
			if (Object.prototype.hasOwnProperty.call(e, r)) {
				let i = e[r];
				void 0 !== i && i instanceof ArrayBuffer && void 0 !== i.byteLength && n.push(T(r, i, t));
			}
		if (n.length > 0) {
			for (let o = 0; o < n.length; o++) {
				delete e[n[o].key];
			}
			e.__nativeBuffers__ = n;
		}
		return e;
	},
		F = function (e) {
			if (!P("Object")(e) || !e.__nativeBuffers__) return e;
			let t = e.__nativeBuffers__;
			delete e.__nativeBuffers__;
			for (var n, r = h(t); !(n = r()).done;) {
				let i = n.value;
				if (i) {
					let o = x(i);
					void 0 !== o && o instanceof ArrayBuffer && (e[i.key] = o);
				}
			}
			return e;
		},
		O = ["info", "warn", "error", "debug", "log"],
		N = ["error", "warn"],
		D = ["group", "groupEnd"],
		R = new ((function () {
			function e() {
				let e = this;
				(this.prefix = "[TMA]"),
					(this.type = ""),
					(this.deprecated = function () {
						for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
						e.warn.apply(e, ["Deprecated:"].concat(n));
					}),
					(this.removeAt = function (t) {
						for (var n, r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++) i[o - 1] = arguments[o];
						(n = console).warn.apply(n, [e.prefix + "[WARN][DEV]", "Deprecated(>= " + t.sdkVersion + " removed):"].concat(i));
					});
				for (var t, n = h(O); !(t = n()).done;) {
					let r = t.value;
					this[r] = this.createLogMethod(r);
				}
				for (var i, o = h(D); !(i = o()).done;) {
					let a = i.value;
					this[a] = this.createControlMethod(a);
				}
			}
			let t = e.prototype;
			return (
				(t.setPrefix = function (e) {
					this.prefix = e;
				}),
				(t.createLogMethod = function (e) {
					let t = this;
					if (!N.includes(e)) return function () { };
					let n = e.toUpperCase();
					return function () {
						for (var r, i = arguments.length, o = new Array(i), a = 0; a < i; a++) o[a] = arguments[a];
						(r = console)[e].apply(r, [t.prefix + "[" + n + "][RUNTIME]"].concat(o));
					};
				}),
				(t.createControlMethod = function (e) {
					return function () { };
				}),
				l(e)
			);
		})())(),
		j = new Function("return this;")();
	j.webkit;
	let B = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
		V = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
	j.btoa;
	let W =
		j.atob ||
		function (e) {
			if (((e = String(e).replace(/[\t\n\f\r ]+/g, "")), !V.test(e)))
				throw new TypeError('Failed to execute "atob" on "Window": The string ' + e + " to be decoded is not correctly encoded.");
			let t;
			e += "==".slice(2 - (3 & e.length));
			for (var n, r, i = "", o = 0; o < e.length;)
				(t =
					(B.indexOf(e.charAt(o++)) << 18) |
					(B.indexOf(e.charAt(o++)) << 12) |
					((n = B.indexOf(e.charAt(o++))) << 6) |
					(r = B.indexOf(e.charAt(o++)))),
					(i +=
						64 === n
							? String.fromCharCode((t >> 16) & 255)
							: 64 === r
								? String.fromCharCode((t >> 16) & 255, (t >> 8) & 255)
								: String.fromCharCode((t >> 16) & 255, (t >> 8) & 255, 255 & t));
			return i;
		};
	function z(e) {
		for (var t = W(e), n = t.length, r = new Uint8Array(n), i = 0; i < n; i++) r[i] = t.charCodeAt(i);
		return r.buffer;
	}
	function q(e) {
		return Object.prototype.toString.call(e).split(" ")[1].slice(0, -1);
	}
	function U(e, t) {
		let n,
			r = null,
			i = void 0,
			o = function () {
				n && clearTimeout(n), (n = null), r && (i = e.apply(void 0, r)), (r = null);
			},
			a = function () {
				n && clearTimeout(n), (n = null);
			},
			s = function () {
				a();
				for (var e = arguments.length, s = new Array(e), c = 0; c < e; c++) s[c] = arguments[c];
				return (r = s), (n = setTimeout(o, t)), i;
			};
		return (s.cancel = a), (s.flush = o), s;
	}
	function J(e, t, n) {
		let r,
			i = n.errMsg,
			o = void 0 === i ? "unknown" : i,
			a = n.context,
			s = void 0 === a ? e : a,
			c = n.wrap,
			u = n.action,
			l = void 0 === u ? "report" : u,
			f = n.reporter;
		try {
			r = e.apply(s, t);
		} catch (e) {
			let d = e;
			if ((c && (d = c(e, o)), "throw" === l)) throw d;
			"report" === l && f ? f(d, n) : R.error(d);
		}
		return r;
	}
	function H(e) {
		return [
			function (t, n, r) {
				return J(t, n, Object.assign({}, e, r));
			},
			function (t, n) {
				let r = Object.assign({}, e, n);
				return function () {
					for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++) n[i] = arguments[i];
					return J(t, n, r);
				};
			}
		];
	}
	let K,
		G,
		Q,
		Y,
		Z,
		$ = t(
			n(function (e) {
				(e.exports = function (e) {
					if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
					return e;
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		),
		X = (function () {
			function e(e) {
				let t;
				void 0 === e && (e = {}),
					(this.events = new Map()),
					(this.callbackMap = new WeakMap()),
					(this.wrapper = void 0),
					(this.wrapper = null != (t = e.wrapper) ? t : null);
			}
			let t = e.prototype;
			return (
				(t.emit = function (e, t) {
					let n = this.events.get(e);
					null == n ||
						n.forEach(function (e) {
							return e(t);
						});
				}),
				(t.on = function (e, t) {
					if ("function" == typeof t) {
						let n = this.events.get(e);
						n || ((n = []), this.events.set(e, n));
						let r = t;
						if (this.wrapper) {
							let i = this.callbackMap.get(t);
							i ? (r = i) : ((r = this.wrapper(t)), this.callbackMap.set(t, r));
						}
						n.push(r);
					}
				}),
				(t.off = function (e, t) {
					if (t) {
						let n = this.wrapper ? this.callbackMap.get(t) : t,
							r = this.events.get(e);
						if ("function" == typeof n && r) {
							let i = r.indexOf(n);
							-1 !== i && r.splice(i, 1), 0 === r.length && this.events.delete(e);
						}
					} else this.events.delete(e);
				}),
				(t.size = function (e, t) {
					let n = this.events.get(e);
					if (!n) return 0;
					if (!t) return n.length;
					let r = this.wrapper ? this.callbackMap.get(t) : t;
					return "function" != typeof r
						? 0
						: n.filter(function (e) {
							return e === r;
						}).length;
				}),
				(t.removeAllListeners = function () {
					this.events = new Map();
				}),
				l(e)
			);
		})();
	!(function (e) {
		(e[(e.trace = 1)] = "trace"),
			(e[(e.normal = 2)] = "normal"),
			(e[(e.warn = 3)] = "warn"),
			(e[(e.error = 4)] = "error"),
			(e[(e.fatal = 5)] = "fatal");
	})(K || (K = {})),
		(function (e) {
			(e.traceId = "trace_id"),
				(e.errorCode = "error_code"),
				(e.errorMsg = "error_msg"),
				(e.time = "time"),
				(e.duration = "duration"),
				(e.monitorLevel = "monitor_level"),
				(e.monitorDomain = "monitor_domain"),
				(e.monitorCode = "monitor_code"),
				(e.monitorID = "monitor_id"),
				(e.monitorMessage = "monitor_message"),
				(e.monitorTags = "monitor_tags"),
				(e.monitorFile = "monitor_file"),
				(e.monitorFunction = "monitor_function"),
				(e.monitorLine = "monitor_line"),
				(e.monitorColumn = "monitor_column"),
				(e.monitorStack = "monitor_stack"),
				(e.resultType = "result_type");
		})(G || (G = {})),
		(function (e) {
			e.BATCH = "BATCH";
		})(Q || (Q = {})),
		(function (e) {
			(e.success = "success"), (e.fail = "fail"), (e.cancel = "cancel"), (e.timeout = "timeout");
		})(Y || (Y = {})),
		(function (e) {
			(e[(e.debug = 1)] = "debug"),
				(e[(e.info = 2)] = "info"),
				(e[(e.warn = 3)] = "warn"),
				(e[(e.error = 4)] = "error"),
				(e[(e.fatal = 5)] = "fatal");
		})(Z || (Z = {}));
	let ee,
		te,
		ne = ",",
		re = "op_monitor_event",
		ie = "op_monitor",
		oe = "event_name";
	!(function (e) {
		(e.warn = "warn"), (e.error = "error");
	})(ee || (ee = {})),
		(function (e) {
			(e.sampleRate = "sample_rate"),
				(e.traceSampleRate = "trace_sample_rate"),
				(e.normalSampleRate = "normal_sample_rate"),
				(e.warnSampleRate = "warn_sample_rate"),
				(e.errorSampleRate = "error_sample_rate"),
				(e.fatalSampleRate = "fatal_sample_rate"),
				(e.rules = "rules"),
				(e.priority = "priority"),
				(e.filters = "filters"),
				(e.key = "key"),
				(e.values = "values");
		})(te || (te = {}));
	let ae = function () { };
	function se(e) {
		return void 0 === e;
	}
	let ce,
		ue,
		le = {
			string: function (e) {
				return (
					"string" == typeof e ||
					"String" ===
					(function (e) {
						return Object.prototype.toString.call(e).slice(8, -1);
					})(e)
				);
			},
			undefined: se,
			void: function (e) {
				return se(e) || null === e;
			},
			object: function (e) {
				return null !== e && "object" == typeof e;
			},
			number: function (e) {
				return "number" == typeof e && !Number.isNaN(e);
			},
			function: function (e) {
				return "function" == typeof e;
			}
		};
	function fe(e, t) {
		return Object.entries(e)
			.filter(function (e) {
				let n = e[0],
					r = e[1];
				return !t(r, n);
			})
			.reduce(function (e, t) {
				let n,
					r = t[0],
					i = t[1];
				return Object.assign(e, (((n = {})[r] = i), n));
			}, {});
	}
	function de(e, t, n) {
		Object.defineProperty(e, t, {
			get: function () {
				return n;
			},
			set: function () { }
		});
	}
	function he() {
		return (
			ce ||
			(ce = (function () {
				if ("undefined" != typeof self) return self;
				if ("undefined" != typeof window) return window;
				if ("undefined" != typeof global) return global;
				throw new Error("unable to locate global object");
			})())
		);
	}
	!(function (e) {
		(e[(e.NONE = 0)] = "NONE"), (e[(e.INITED = 1)] = "INITED"), (e[(e.DESTROYED = 2)] = "DESTROYED");
	})(ue || (ue = {}));
	let pe = (function () {
		function e() {
			(this._lifeState = ue.NONE), (this._setupHandlers = []), (this._teardownHandlers = []);
		}
		let t = e.prototype;
		return (
			(t.setup = function () {
				let e = this;
				this._setupHandlers.forEach(function (t) {
					let n = t();
					"function" == typeof n && e._teardownHandlers.push(n);
				});
			}),
			(t.teardown = function () {
				this._teardownHandlers.forEach(function (e) {
					return e();
				});
			}),
			(t.addSetupHandler = function (e) {
				this._setupHandlers.push(e);
			}),
			(t.addTeardownHandler = function (e) {
				this._teardownHandlers.push(e);
			}),
			(t._runSetup = function () {
				this._lifeState === ue.NONE && ((this._lifeState = ue.INITED), this.setup());
			}),
			(t._runTeardown = function () {
				this._lifeState === ue.INITED && ((this._lifeState = ue.DESTROYED), this.teardown());
			}),
			l(e, [
				{
					key: "isReady",
					get: function () {
						return this._lifeState === ue.INITED;
					}
				},
				{
					key: "isDestroyed",
					get: function () {
						return this._lifeState === ue.DESTROYED;
					}
				}
			]),
			e
		);
	})();
	function ve(e) {
		e._runSetup();
	}
	let ge = (function () {
		function e(e) {
			let t = e.priority,
				n = e.sampleRate,
				r = e.filters;
			(this.priority = 0), (this.filters = []), (this.priority = t), (this.sampleRate = n), (this.filters = r);
		}
		return (
			(e.prototype.match = function (e) {
				return this.filters.every(function (t) {
					return t.match(e);
				});
			}),
			l(e)
		);
	})(),
		me = (function () {
			function e(e) {
				let t = e.key,
					n = e.values;
				(this.key = ""), (this.values = []), (this.key = t), (this.values = n);
			}
			return (
				(e.prototype.match = function (e) {
					let t = "" + e[this.key];
					return this.values.includes(t);
				}),
				l(e)
			);
		})(),
		ye = (function () {
			function e() {
				(this._defaultSampleRate = 1),
					(this._traceSampleRate = 0),
					(this._normalSampleRate = 1),
					(this._warnSampleRate = 1),
					(this._errorSampleRate = 1),
					(this._fatalSampleRate = 1),
					(this._orderedRules = []);
			}
			let t = e.prototype;
			return (
				(t.buildConfig = function (e) {
					void 0 === e && (e = {});
					let t = e,
						n = t[te.sampleRate],
						r = t[te.traceSampleRate],
						i = t[te.normalSampleRate],
						o = t[te.warnSampleRate],
						a = t[te.errorSampleRate],
						s = t[te.fatalSampleRate],
						c = t[te.rules];
					le.number(n) && (this._defaultSampleRate = n),
						le.number(r) && (this._traceSampleRate = r),
						le.number(i) && (this._normalSampleRate = i),
						le.number(o) && (this._warnSampleRate = o),
						le.number(a) && (this._errorSampleRate = a),
						le.number(s) && (this._fatalSampleRate = s);
					let u = this._parseRules(c);
					this._orderedRules = u.sort(function (e, t) {
						return t.priority - e.priority;
					});
				}),
				(t.getSampleRate = function (e) {
					let t = this._getMatchedRuleInOrderedRules(e),
						n = this._defaultSampleRate;
					switch (e[G.monitorLevel]) {
						case K.trace:
							n = this._traceSampleRate;
							break;
						case K.normal:
							n = this._normalSampleRate;
							break;
						case K.warn:
							n = this._warnSampleRate;
							break;
						case K.error:
							n = this._errorSampleRate;
							break;
						case K.fatal:
							n = this._fatalSampleRate;
					}
					return t && !le.undefined(t.sampleRate) && (n = t.sampleRate), n >= 1 ? 1 : 0;
				}),
				(t._getMatchedRuleInOrderedRules = function (e) {
					return this._orderedRules.find(function (t) {
						return t.match(e);
					});
				}),
				(t._parseRules = function (e) {
					return Array.isArray(e)
						? (e = e
							.map(function (e) {
								if (le.object(e)) {
									let t = e[te.priority],
										n = e[te.sampleRate],
										r = e[te.filters];
									return (
										le.number(t) || (t = 0),
										le.number(n) || (n = void 0),
										(r = Array.isArray(r)
											? r
												.map(function (e) {
													if (le.object(e)) {
														let t = e,
															n = t[te.key],
															r = t[te.values];
														return le.string(n) && Array.isArray(r) ? (e = new me({ key: n, values: r })) : void 0;
													}
												})
												.filter(function (e) {
													return e;
												})
											: []),
										new ge({ priority: t, sampleRate: n, filters: r })
									);
								}
							})
							.filter(function (e) {
								return e;
							}))
						: [];
				}),
				l(e)
			);
		})(),
		ke = (function () {
			function e(t) {
				let n = this;
				if (
					((this._domainToNameRegistry = new Map()),
						(this._domainToParamInjectorRegistry = new Map()),
						(this._domainToNameCache = new Map()),
						t instanceof e)
				)
					return t;
				let r = t || {},
					i = r.defaultName,
					o = void 0 === i ? re : i,
					a = r.log,
					s = r.report,
					c = void 0 === s ? ae : s,
					u = r.commonMetrics,
					l = void 0 === u ? {} : u,
					f = r.commonCategories,
					d = void 0 === f ? {} : f,
					h = r.commonTags,
					p = void 0 === h ? [] : h,
					v = r.defaultPlatform,
					g = void 0 === v ? "Slardar" : v,
					m = r.domainToNameMap,
					y = r.domainToParamInjectorMap;
				(this.defaultName = String(o)),
					(this.defaultPlatform = g),
					(this._log = a),
					(this._report = c),
					(this.commonMetrics = l),
					(this.commonCategories = d),
					(this.commonTags = new Set(p)),
					m &&
					Object.entries(m).forEach(function (e) {
						let t = e[0],
							r = e[1];
						n.registerEvent(r, t);
					}),
					y &&
					Object.entries(y).forEach(function (e) {
						let t = e[0],
							r = e[1];
						n.registerParamInjector(t, r);
					});
			}
			let t = e.prototype;
			return (
				(t.setRemoteConfig = function (e) {
					this._remoteConfig = e;
				}),
				(t.getRemoteConfig = function () {
					return this._remoteConfig ? this._remoteConfig : this.constructor.globalRemoteConfig;
				}),
				(t.log = function (e) {
					le.function(this._log) && this._log(e);
				}),
				(t.report = function (e) {
					let t,
						n = this.getRemoteConfig(),
						r = e.name,
						i = e.metrics,
						o = e.categories,
						a = Object.assign(Object.assign((((t = {})[oe] = r), t), i), o);
					n.getSampleRate(a) < 1 || this._report(e);
				}),
				(t.registerEvent = function (e, t) {
					if (this._domainToNameRegistry.get(t) !== e) {
						this._domainToNameRegistry.set(t, e);
						for (var n, r = h(this._domainToNameCache.keys()); !(n = r()).done;) {
							let i = n.value;
							i.startsWith(t) && this._domainToNameCache.delete(i);
						}
					}
				}),
				(t.getNameByDomain = function (e) {
					return this._findName(e) || this.defaultName;
				}),
				(t.registerParamInjector = function (e, t) {
					this._domainToParamInjectorRegistry.set(e, t);
				}),
				(t.applyParamInjectorByDomain = function (e, t) {
					for (let n = e.split("."), r = n.length, i = 1; i <= r; i++) {
						let o = n.slice(0, i).join("."),
							a = this._domainToParamInjectorRegistry.get(o);
						le.function(a) && a(t);
					}
				}),
				(t._findName = function (e) {
					if (this._domainToNameCache.has(e)) return this._domainToNameCache.get(e);
					for (var t, n = e.split("."), r = n.length, i = 0; i < r; i++) {
						let o = n.slice(0, r - i).join(".");
						if ((t = this._domainToNameRegistry.get(o))) return this._domainToNameCache.set(o, t), t;
					}
					return this.defaultName;
				}),
				l(e)
			);
		})();
	ke.globalRemoteConfig = new ye();
	let we = (function () {
		function e(t) {
			if (((this.cacheList = []), (this.waitingForReport = !1), t instanceof e)) return t;
			this._setConfig(t);
		}
		e.setup = function (e) {
			this.default._setConfig(e);
		};
		let t = e.prototype;
		return (
			(t.getConfig = function () {
				return this.config;
			}),
			(t.log = function (e) {
				if (le.function(this.config.log)) {
					let t = Z.info;
					switch (e.getLevel()) {
						case K.trace:
						case K.normal:
							t = Z.info;
							break;
						case K.warn:
							t = Z.warn;
							break;
						case K.error:
							t = Z.error;
							break;
						case K.fatal:
							t = Z.fatal;
							break;
						default:
							t = Z.info;
					}
					let n = ie,
						r = e.getValue(G.monitorFile),
						i = e.getValue(G.monitorFunction),
						o = e.getValue(G.monitorLine),
						a = e.getData(),
						s = "monitor_event : " + e.getName() + " " + JSON.stringify(a);
					this.invokeLog(fe({ level: t, tag: n, file: r, functionName: i, line: o, content: s }, se));
				}
			}),
			(t.reportTo = function (e) {
				let t = e.getValue(G.monitorDomain);
				t && this.config.applyParamInjectorByDomain(String(t), e);
				let n = this._getName(e),
					r = e.getMetrics(),
					i = e.getCategories(),
					o = e.getInternalData(),
					a = this._getPlatform(e);
				le.function(this.config.report) &&
					this.invokeReport(fe({ name: n, metrics: r, categories: i, internalData: o, platform: a }, se));
			}),
			(t.flush = function (e) {
				let t = e.getInternalData(),
					n = t.logEnabled,
					r = void 0 === n || n,
					i = t.reportEnabled,
					o = void 0 === i || i,
					a = e.getValue(G.monitorDomain);
				a && this.config.applyParamInjectorByDomain(String(a), e);
				let s = this._getName(e),
					c = e.getMetrics(),
					u = e.getCategories(),
					l = e.getInternalData(),
					f = this._getPlatform(e);
				o &&
					le.function(this.config.report) &&
					this.invokeReport(fe({ name: s, metrics: c, categories: u, internalData: l, platform: f }, se)),
					r && this.log(e);
			}),
			(t.flushWithThrottle = function (e) {
				let t = this,
					n = this.getConfig();
				if (le.function(this.config.report)) {
					let r = e.getValue(G.monitorDomain);
					r && this.config.applyParamInjectorByDomain(String(r), e);
					let i,
						o = this._getPlatform(e),
						a = this._getName(e),
						s = function () {
							t.cacheList.forEach(function (e) {
								return n.report(Object.assign(Object.assign({}, e), { platform: o }));
							}),
								(t.cacheList.length = 0),
								(t.waitingForReport = !1),
								he().clearTimeout(i);
						};
					this.cacheList.push({
						name: a,
						metrics: e.getMetrics(),
						categories: e.getCategories(),
						internalData: e.getInternalData()
					});
					let c = e.getValue(G.monitorLevel);
					this.cacheList.length >= 20 || (c && c >= K.error)
						? s()
						: this.waitingForReport ||
						((this.waitingForReport = !0),
							(i = he().setTimeout(function () {
								s();
							}, 2e3)));
				}
			}),
			(t.invokeLog = function (e) {
				le.function(this.config.log) && this.config.log(e);
			}),
			(t.invokeReport = function (e) {
				le.function(this.config.report) && this.config.report(e);
			}),
			(t._setConfig = function (e) {
				this.config = new ke(e);
			}),
			(t._getName = function (e) {
				let t = e.getValue(G.monitorDomain);
				return e.getName() || (t && this.config.getNameByDomain(String(t))) || this.config.defaultName;
			}),
			(t._getPlatform = function (e) {
				return e.platform || this.config.defaultPlatform;
			}),
			l(e)
		);
	})();
	we.default = new we();
	let be = (function () {
		function e(t) {
			if (t instanceof e) return t;
			let n = t || {},
				r = n.domain,
				i = n.code,
				o = n.level,
				a = n.message;
			de(this, "version", 1),
				de(this, "domain", String(r)),
				de(this, "code", Number(i)),
				de(this, "ID", String(this.generateID())),
				de(this, "level", o),
				de(this, "message", String(a));
		}
		let t = e.prototype;
		return (
			(t.equals = function (t) {
				return t instanceof e && t.ID === this.ID;
			}),
			(t.toJSON = function () {
				return { domain: this.domain, code: this.code, level: this.level, message: this.message };
			}),
			(t.generateID = function () {
				return this.version + "-" + this.domain + "-" + this.code;
			}),
			l(e)
		);
	})(),
		_e = (function () {
			function e(e) {
				(this.metrics = {}),
					(this.categories = {}),
					(this.internalData = {}),
					(this.tags = new Set()),
					(this._time = 0),
					(this._startTime = 0),
					(this._endTime = 0),
					(this._flushed = !1);
				let t = e || {},
					n = t.service,
					r = t.name,
					i = void 0 === r ? re : r,
					o = t.code,
					a = t.platform,
					s = t.metrics,
					c = t.categories,
					u = t.internalData;
				(this.service = n ? new we(n) : we.default),
					(this.name = i),
					(this._platform = a),
					o && (this.code = new be(o)),
					(this.categories = Object.assign(Object.assign({}, this.service.getConfig().commonCategories), c)),
					(this.metrics = Object.assign(Object.assign({}, this.service.getConfig().commonMetrics), s)),
					(this.tags = new Set(this.service.getConfig().commonTags)),
					(this.internalData = Object.assign({}, u));
			}
			let t = e.prototype;
			return (
				(t.addMetricValue = function (e, t) {
					return le.undefined(t) || (this.metrics[e] = t), this;
				}),
				(t.addCategoryValue = function (e, t) {
					return le.undefined(t) || (this.categories[e] = t), this;
				}),
				(t.addTag = function (e) {
					return le.undefined(e) || this.tags.add(e), this;
				}),
				(t.addMap = function (e) {
					let t = this;
					return (
						void 0 === e && (e = {}),
						Object.entries(e).forEach(function (e) {
							let n = e[0],
								r = e[1];
							le.undefined(r) || (le.number(r) ? (t.metrics[n] = r) : (t.categories[n] = r));
						}),
						this
					);
				}),
				(t.tracing = function (e) {
					return le.undefined(e) || this.addCategoryValue(G.traceId, e), this;
				}),
				(t.flush = function (e) {
					if (!this._flushed) {
						this._flushed = !0;
						let t = this.getInternalData(),
							n = t.logEnabled,
							r = void 0 === n || n,
							i = t.reportEnabled,
							o = void 0 === i || i,
							a = this.code || (this.hasErrorInfo() ? this.codeIfError : void 0);
						le.undefined(this.level) && a && a.level && this.setLevel(a.level),
							a &&
							(this.addCategoryValue(G.monitorDomain, a.domain),
								this.addMetricValue(G.monitorCode, a.code),
								this.addCategoryValue(G.monitorMessage, a.message)),
							this.tags && this.addCategoryValue(G.monitorTags, this.tagsInline()),
							this.time <= 0 && this.setTime(Date.now()),
							o && (e || this.service).reportTo(this),
							r && this.service.log(this);
					}
				}),
				(t.flushWithThrottle = function () {
					this._flushed || ((this._flushed = !0), this.service.flushWithThrottle(this));
				}),
				(t.setMonitorCode = function (e) {
					return le.undefined(e) || (this.code = new be(e)), this;
				}),
				(t.setMonitorCodeIfError = function (e) {
					return le.undefined(e) || (this.codeIfError = new be(e)), this;
				}),
				(t.setLevel = function (e) {
					return le.undefined(e) || ((this.level = e), this.addMetricValue(G.monitorLevel, e)), this;
				}),
				(t.setErrorCode = function (e) {
					return le.undefined(e) || this.addCategoryValue(G.errorCode, String(e)), this;
				}),
				(t.setErrorMessage = function (e) {
					return le.undefined(e) || this.addCategoryValue(G.errorMsg, String(e)), this;
				}),
				(t.setError = function (e) {
					if (le.undefined(e)) return this;
					let t = e.message,
						n = e.fileName,
						r = e.lineNumber,
						i = e.columnNumber,
						o = e.stack,
						a = e.code,
						s = e.monitorCode;
					return (
						le.string(t) && this.addCategoryValue(G.errorMsg, t),
						le.string(n) && this.addCategoryValue(G.monitorFile, n),
						le.string(o) && this.addCategoryValue(G.monitorStack, o),
						le.number(a) && this.addMetricValue(G.errorCode, a),
						le.number(r) && this.addMetricValue(G.monitorLine, r),
						le.number(i) && this.addMetricValue(G.monitorColumn, i),
						s && this.setMonitorCode(s),
						this
					);
				}),
				(t.setTime = function (e) {
					return le.undefined(e) || ((this._time = e), this.addMetricValue(G.time, e)), this;
				}),
				(t.setPlatform = function (e) {
					return e && (this._platform = e), this;
				}),
				(t.timing = function (e) {
					let t = Date.now();
					return (
						this._startTime > 0
							? ((this._endTime = t), this.addMetricValue(e || G.duration, this._endTime - this._startTime))
							: (this._startTime = t),
						this
					);
				}),
				(t.setDuration = function (e) {
					return le.undefined(e) || this.addMetricValue(G.duration, e), this;
				}),
				(t.getCode = function () {
					return this.code;
				}),
				(t.getName = function () {
					return this.name;
				}),
				(t.getMetrics = function () {
					return Object.assign({}, this.metrics);
				}),
				(t.getCategories = function () {
					return Object.assign({}, this.categories);
				}),
				(t.getInternalData = function () {
					return this.internalData;
				}),
				(t.getData = function () {
					return Object.assign(Object.assign({}, this.metrics), this.categories);
				}),
				(t.getValue = function (e) {
					return this.metrics[e] || this.categories[e];
				}),
				(t.setResultType = function (e) {
					return this.addCategoryValue(G.resultType, e), this;
				}),
				(t.setResultTypeSuccess = function () {
					return this.setResultType(Y.success), this;
				}),
				(t.setResultTypeFail = function () {
					return this.setResultType(Y.fail), this;
				}),
				(t.setResultTypeCancel = function () {
					return this.setResultType(Y.cancel), this;
				}),
				(t.setResultTypeTimeout = function () {
					return this.setResultType(Y.timeout), this;
				}),
				(t.getLevel = function () {
					return this.level;
				}),
				(t.getMonitorId = function () {
					return this.code && this.code.ID;
				}),
				(t.getMonitorDomain = function () {
					return this.code && this.code.domain;
				}),
				(t.toJSON = function () {
					return { name: this.name, categories: this.getCategories(), metrics: this.getMetrics() };
				}),
				(t.addInternalData = function (e) {
					return Object.assign(this.internalData, e), this;
				}),
				(t.hasErrorInfo = function () {
					return !le.undefined(this.getValue(G.errorCode)) || !le.undefined(this.getValue(G.errorMsg));
				}),
				(t.tagsInline = function () {
					return 0 === this.tags.size
						? ""
						: Array.from(this.tags).reduce(function (e, t) {
							return "" + e + (t ? ne + t : "");
						});
				}),
				l(e, [
					{
						key: "time",
						get: function () {
							return this._time;
						}
					},
					{
						key: "platform",
						get: function () {
							return this._platform;
						}
					}
				]),
				e
			);
		})(),
		Se = function (e, t, n, r) {
			return { domain: e, code: t, level: n, message: r };
		},
		Ce = (function () {
			return K.error;
		})(),
		Ae = (function () {
			return K.warn;
		})(),
		Me = (function () {
			return K.normal;
		})(),
		Ee = function (e, t, n) {
			return Se(e, t, Ae, n);
		},
		Ie = function (e, t, n) {
			return Se(e, t, Me, n);
		},
		Te = "js.open_platform.gadget",
		xe = "mp_api_invoke_result",
		Pe = "op_js_network",
		Le = "op_network_v1_bk_dev",
		Fe = Te + ".js_runtime_error",
		Oe = Se(Fe, 10001, Ce, "app_service_sdk_script_error"),
		Ne = Ee(Fe, 100004, "third_script_error"),
		De = Ee(Te, 1e4, "undefined_default_code"),
		Re = Ee("js.open_platform.gadget.api", 10004, "api_queue_timeout"),
		je = Te + ".network",
		Be = Ie(je, 1e4, "request_result"),
		Ve = Ie(je, 10004, "download_result"),
		We = Ie(je, 10005, "abort_download"),
		ze = Ie(je, 10006, "request_enter_waiting_queue"),
		qe = Ie(je, 10020, "op_network_v1_bk_dev");
	(function () {
		function e(e) {
			let t = this;
			(this.maxCacheCount = void 0),
				(this.maxCacheTime = void 0),
				(this.list = []),
				(this.handler = null),
				(this.config = new ke({
					report: function (e) {
						return t.report(e);
					},
					log: function () { }
				})),
				(this.maxCacheCount = e.maxCacheCount),
				(this.maxCacheTime = e.maxCacheTime);
		}
		(e.init = function (t) {
			let n,
				r,
				i = (this.OPMonitor = new e({
					maxCacheCount: null != (n = t.maxCacheCount) ? n : 10,
					maxCacheTime: null != (r = t.maxCacheTime) ? r : 500
				}));
			we.setup(i.config);
		}),
			(e.get = function () {
				return this.OPMonitor;
			});
		let t = e.prototype;
		return (
			(t.report = function (e) {
				let t = this,
					n = e.name,
					r = e.metrics,
					i = e.categories,
					o = void 0 === i ? {} : i,
					a = e.platform,
					s = o.monitor_level,
					c = { name: n, metrics: r, categories: o };
				"Slardar" !== a && (c.platform = a),
					this.list.push(c),
					this.list.length >= this.maxCacheCount || (s && s >= K.error)
						? this.flush()
						: this.handler ||
						(this.handler = setTimeout(function () {
							(t.handler = null), t.flush();
						}, this.maxCacheTime));
			}),
			(t.flush = function () {
				if (this.list.length) {
					let e = { monitorEvents: this.list },
						t = (void 0).agent.isSupportNewBridge ? e : JSON.stringify(e);
					(void 0).ttJSBridge.invoke("monitorReport", t),
						(this.list = []),
						this.handler && (clearTimeout(this.handler), (this.handler = null));
				}
			}),
			l(e)
		);
	})().OPMonitor = void 0;
	let Ue,
		Je = (function (e) {
			function t() {
				return e.apply(this, arguments) || this;
			}
			return (
				_(t, e),
				(t.prototype.addMap = function (t) {
					return e.prototype.addMap.call(this, t);
				}),
				l(t)
			);
		})(_e),
		He = function (e, t) {
			return new Je(e ? { name: e, code: new be(t) } : { name: "undefined_default_code", code: new be(De) });
		};
	!(function (e) {
		(e.MOBILE = "mobile"), (e.PC = "pc"), (e.PC_SIDEBAR = "pc_sidebar"), (e.PC_WINDOW = "pc_window"), (e.IDE = "lark_ide");
	})(Ue || (Ue = {}));
	let Ke = n(function (e) {
		function t(n) {
			return (
				(e.exports = t =
					Object.setPrototypeOf
						? Object.getPrototypeOf.bind()
						: function (e) {
							return e.__proto__ || Object.getPrototypeOf(e);
						}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports),
				t(n)
			);
		}
		(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
	}),
		Ge = t(Ke),
		Qe = n(function (e) {
			(e.exports = function (e) {
				return -1 !== Function.toString.call(e).indexOf("[native code]");
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		Ye = n(function (e) {
			(e.exports = function () {
				if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
				if (Reflect.construct.sham) return !1;
				if ("function" == typeof Proxy) return !0;
				try {
					return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () { })), !0;
				} catch (e) {
					return !1;
				}
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		Ze = n(function (e) {
			function t(n, r, i) {
				return (
					Ye()
						? ((e.exports = t = Reflect.construct.bind()), (e.exports.__esModule = !0), (e.exports.default = e.exports))
						: ((e.exports = t =
							function (e, t, n) {
								let r = [null];
								r.push.apply(r, t);
								let i = new (Function.bind.apply(e, r))();
								return n && b(i, n.prototype), i;
							}),
							(e.exports.__esModule = !0),
							(e.exports.default = e.exports)),
					t.apply(null, arguments)
				);
			}
			(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
		});
	let $e,
		Xe,
		et = (function (e) {
			function t(t, n) {
				let r;
				return (
					((r = e.call(this, t) || this).errno = void 0),
					(r.errString = void 0),
					(function (e, t) {
						t &&
							"cause" in t &&
							Object.defineProperty(e, "cause", { writable: !0, configurable: !0, enumerable: !1, value: t.cause });
					})($(r), n),
					r
				);
			}
			return (
				_(t, e),
				(t.is = function (e) {
					return e instanceof t;
				}),
				l(t)
			);
		})(
			t(
				n(function (e) {
					function t(n) {
						let r = "function" == typeof Map ? new Map() : void 0;
						return (
							(e.exports = t =
								function (e) {
									if (null === e || !Qe(e)) return e;
									if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function");
									if (void 0 !== r) {
										if (r.has(e)) return r.get(e);
										r.set(e, t);
									}
									function t() {
										return Ze(e, arguments, Ke(this).constructor);
									}
									return (
										(t.prototype = Object.create(e.prototype, {
											constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 }
										})),
										b(t, e)
									);
								}),
							(e.exports.__esModule = !0),
							(e.exports.default = e.exports),
							t(n)
						);
					}
					(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
				})
			)(Error)
		),
		tt = (function (e) {
			function t() {
				for (var t, n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
				return ((t = e.call.apply(e, [this].concat(r)) || this).name = "ThirdScriptError"), t;
			}
			return (
				_(t, e),
				(t.is = function (e) {
					return e instanceof Error && "ThirdScriptError" === e.name;
				}),
				l(t, [
					{
						key: "monitorCode",
						get: function () {
							return Ne;
						}
					}
				]),
				t
			);
		})(et),
		nt = (function (e) {
			function t() {
				for (var t, n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
				return ((t = e.call.apply(e, [this].concat(r)) || this).name = "ServiceError"), t;
			}
			return (
				_(t, e),
				(t.is = function (e) {
					return e instanceof Error && "ServiceError" === e.name;
				}),
				l(t, [
					{
						key: "monitorCode",
						get: function () {
							return Oe;
						}
					}
				]),
				t
			);
		})(et);
	!(function (e) {
		(e.NAVIGATE_TO = "navigateTo"),
			(e.REDIRECT_TO = "redirectTo"),
			(e.NAVIGATE_BACK = "navigateBack"),
			(e.SWITCH_TAB = "switchTab"),
			(e.APP_LAUNCH = "appLaunch"),
			(e.RE_LAUNCH = "reLaunch"),
			(e.AUTO_RELAUNCH = "autoReLaunch"),
			(e.RESTORE_TO = "restoreTo"),
			(e.APP_RESTORE_LAUNCH = "appRestoreLaunch"),
			(e.APP_ROUTE_DESTROY = "appRouteDestroy");
	})($e || ($e = {})),
		(function (e) {
			(e.DEFAULT = "default"), (e.CLONE = "clone"), (e.ACTIVATE = "activate");
		})(Xe || (Xe = {}));
	let rt = H({
		wrap: function (e, t) {
			return new tt(t, { cause: e });
		},
		reporter: function (e, t) {
			let n = t.data;
			null != n && n.dispatchUnhandledError ? n.dispatchUnhandledError(e) : R.error(e);
		}
	})[1];
	function it(e) {
		return Object.prototype.toString.call(e).slice(8, -1);
	}
	function ot(e) {
		return "Function" === it(e);
	}
	let at = function (e) {
		return "Parameter error. Invalid value for " + e;
	},
		st = function (e) {
			return "Parameter error. " + e + " is of wrong type";
		},
		ct = function (e) {
			return "Parameter error. " + e + " cannot be empty";
		},
		ut = function () {
			return "Parameter error. openId and openChatId cannot be both empty.";
		},
		lt = function () {
			return "Unable to load image";
		};
	function ft(e, t, n) {
		void 0 === n && (n = "param");
		let r = it(e),
			i = it(t);
		if (r !== i) return n + " should pass " + i + ", not " + r;
		let o = "";
		switch (i) {
			case "Object":
				for (let a in t) o += ft(e[a], t[a], n + "." + a);
				break;
			case "Array":
				if (e.length < t.length) return n + " should have more than " + t.length + " items, not " + e.length + " items";
				for (let s = 0; s < t.length; ++s) o += ft(e[s], t[s], n + "[" + s + "]");
		}
		return o;
	}
	let dt = 104,
		ht = 1002012,
		pt = 1300007,
		vt = function (e, t) {
			return (e.errno = dt), (e.errString = at(t)), e;
		},
		gt = function (e, t) {
			return (e.errno = dt), (e.errString = st(t)), e;
		};
	function mt() {
		return "Object" === it(TMAConfig) ? TMAConfig.platform : "";
	}
	function yt(e, t, n, r) {
		void 0 === t && (t = {}), void 0 === n && (n = ""), void 0 === r && (r = {});
		let i = e + ":fail " + n,
			o = Object.assign({ errMsg: i }, r);
		ot(t.fail) && _t(t.fail, "at " + e + " fail callback")(o),
			ot(t.complete) && _t(t.complete, "at " + e + " complete callback")(o);
	}
	function kt(e, t, n) {
		void 0 === t && (t = {}), void 0 === n && (n = {});
		let r = e + ":ok",
			i = Object.assign({ errMsg: r }, n);
		ot(t.success) && _t(t.success, "at " + e + " success callback")(i),
			ot(t.complete) && _t(t.complete, "at " + e + " complete callback")(i);
	}
	let wt = H({
		wrap: function (e, t) {
			return et.is(e) ? e : new nt(t, { cause: e });
		},
		action: "throw"
	})[1];
	function bt(e, t) {
		return wt(e, { errMsg: t, context: e });
	}
	function _t(e, t) {
		return rt(e, { errMsg: t, context: e });
	}
	bt(function (e) {
		let t = Object.prototype.toString.call(e).split(" ")[1].split("]")[0];
		return {
			data: (e =
				"Array" === t || "Object" === t
					? JSON.stringify(e)
					: "String" === t || "Number" === t || "Boolean" === t
						? e.toString()
						: "Date" === t
							? e.getTime().toString()
							: "Undefined" === t
								? "undefined"
								: "Null" === t
									? "null"
									: ""),
			dataType: t
		};
	}, "anyTypeToString"),
		bt(function (e, t) {
			switch (t) {
				case "String":
					return e;
				case "Array":
				case "Object":
					return JSON.parse(e);
				case "Number":
					return parseFloat(e);
				case "Boolean":
					return "true" === e;
				case "Date":
					return new Date(parseInt(e));
				case "Undefined":
					return;
				case "Null":
					return null;
				default:
					return "";
			}
		}, "stringToAnyType");
	let St = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	function Ct(e) {
		void 0 === e && (e = 20);
		for (var t = "", n = 0; n < e; n++) {
			let r = Math.floor(Math.random() * St.length);
			t += St[r];
		}
		return t;
	}
	let At = 0;
	function Mt() {
		let e = String(Date.now()).slice(-13);
		return (void 0).agent.randomDeviceId, "02" + e + Ct(32) + (At++ % 2176782336).toString(32).padStart(6, "0");
	}
	let Et,
		It = function (e) {
			return e.replace(/[^\u0000-\u00ff]/g, "aa").length;
		};
	!(function (e) {
		(e[(e.unknown = 0)] = "unknown"), (e[(e.android = 1)] = "android"), (e[(e.iOS = 2)] = "iOS");
	})(Et || (Et = {}));
	let Tt = 0;
	let xt,
		Pt,
		Lt = ["success", "fail", "cancel", "complete", "progress", "eventName", "isListener"],
		Ft = (function (e) {
			function t() {
				return e.apply(this, arguments) || this;
			}
			return (
				_(t, e),
				(t.prototype.invoke = function (t, n, r) {
					let i = n.params,
						o = void 0 === i ? {} : i;
					if (n.__v2__) {
						let a = o.success,
							s = o.fail,
							c = o.cancel,
							u = o.complete,
							l = o.progress,
							f = o.eventName,
							d = o.isListener,
							h = void 0 !== d && d,
							v = p(o, Lt),
							g = {
								method: t,
								params: Object.assign({}, v, { __v2__: !0 }),
								callbackConfig: { onSuccess: a, onFail: s, onProgress: l, onCancel: c, onComplete: u },
								eventName: f,
								isListener: h,
								isTT: !0
							};
						e.prototype.invokeNative.call(this, g);
					} else {
						let m = r.eventName,
							y = r.keep,
							k = void 0 !== y && y,
							w = r.onProgress,
							b = r.origialCallback;
						w &&
							(r.onProgress = function (e) {
								e && w(e.data);
							});
						let _ = { method: t, params: n, callbackConfig: r, eventName: m || t, isListener: k, isTT: !1, origialCallback: b };
						e.prototype.invokeNative.call(this, _);
					}
				}),
				l(t)
			);
		})(
			(function () {
				function e() {
					let e = this;
					(this.callbackMapObj = {}),
						(this.callbackMap = new WeakMap()),
						(this._invokeQueue = []),
						(this.randomId = Ct(8)),
						(this._onBridgeReady = function () {
							let t = e.callbackMapObj;
							(window.LarkWebViewJavaScriptBridge = {
								nativeCallBack: function (e) {
									let n;
									null == (n = t[e.callbackID]) || n[0](e);
								}
							}),
								e._invokeQueue.forEach(function (e) {
									e();
								});
						}),
						(this._invokeNative = function (t) {
							let n = t.method,
								r = t.params,
								i = t.callbackConfig,
								o = t.eventName,
								a = t.isListener,
								s = t.isTT,
								c = t.origialCallback,
								u = i.onSuccess,
								l = i.onFail,
								f = i.onProgress,
								d = i.onCancel,
								h = i.onComplete,
								p = a ? o : "" + Tt++,
								v = function (t) {
									let n = t.callbackType,
										r = t.data;
									if (r && "string" == typeof r)
										try {
											r = JSON.parse(r);
										} catch (e) { }
									(r = F(r)),
										"cancel" === n
											? (null == d || d(r), null == h || h(r))
											: "failure" === n
												? (null == l || l(r), null == h || h(r))
												: "continued" === n
													? null == f || f(r)
													: (null == u || u(r), null == h || h(r)),
										a || "continued" === n || delete e.callbackMapObj[p];
								};
							if ((a && e.callbackMapObj[p] ? e.callbackMapObj[p].push(v) : (e.callbackMapObj[p] = [v]), a && (f || c))) {
								let g = c || f;
								e.callbackMap.set(g, e.callbackMapObj[p]);
							}
							let m = { apiName: n, data: L(r, !1), callbackID: p, extra: { callerID: e.randomId } };
							if (!a || !s) {
								let y = e._getSystemType();
								if (y === Et.android)
									try {
										window.Lark_Bridge.invokeNative(JSON.stringify(m) || "");
									} catch (e) { }
								y === Et.iOS && window.webkit.messageHandlers.invokeNative.postMessage(m);
							}
						}),
						window.addEventListener("WebViewJSBridgeReady", this._onBridgeReady.bind(this), !1);
				}
				let t = e.prototype;
				return (
					(t._getSystemType = function () {
						let e = navigator.userAgent;
						return /android/i.test(e) ? Et.android : /iPad|iPhone|iPod/.test(e) ? Et.iOS : Et.unknown;
					}),
					(t._stashTask = function (e) {
						this._invokeQueue.push(e);
					}),
					(t.invokeNative = function (e) {
						let t = this;
						this._isNativeReady()
							? this._invokeNative(e)
							: this._stashTask(function () {
								return t._invokeNative(e);
							});
					}),
					(t.removeListener = function (e, t) {
						let n = this.callbackMapObj[e];
						if (n && Array.isArray(n) && !(n.length <= 0))
							if (t)
								for (let r = this.callbackMap.get(t), i = 0; i < r.length; i++) {
									let o = r[i],
										a = n.indexOf(o);
									if (!~a) return;
									n.splice(a, 1), 0 === n.length && delete this.callbackMapObj[e];
								}
							else delete this.callbackMapObj[e];
					}),
					(t._isNativeReady = function () {
						let e,
							t,
							n,
							r,
							i,
							o,
							a = this._getSystemType(),
							s = !1;
						a === Et.android && (s = !(null == (e = window) || null == (t = e.Lark_Bridge) || !t.invokeNative));
						a === Et.iOS &&
							(s = !(
								null == (n = window) ||
								null == (r = n.webkit) ||
								null == (i = r.messageHandlers) ||
								null == (o = i.invokeNative) ||
								!o.postMessage
							));
						return s;
					}),
					l(e)
				);
			})()
		);
	!(function (e) {
		(e.sdkEnter = "h5jssdk_enter"),
			(e.sdkReady = "h5jssdk_ready"),
			(e.getSdkConfigTimeout = "h5jssdk_get_sdk_config_timeout"),
			(e.getSdkConfigError = "h5jssdk_get_sdk_config_error"),
			(e.authenticationFailure = "h5jssdk_authentication_failure");
	})(xt || (xt = {})),
		(function (e) {
			(e.success = "success"), (e.fail = "fail"), (e.cancel = "cancel"), (e.timeout = "timeout");
		})(Pt || (Pt = {}));
	let Ot,
		Nt,
		Dt,
		Rt,
		jt,
		Bt = "js.open_platform.web",
		Vt =
			(((Ot = {})[xt.getSdkConfigTimeout] = {
				domain: Bt + ".op_web_js_script_error",
				code: 10001,
				level: K.error,
				message: "h5jssdk_get_sdk_config_timeout"
			}),
				(Ot[xt.getSdkConfigError] = {
					domain: Bt + ".op_web_js_script_error",
					code: 10002,
					level: K.error,
					message: "h5jssdk_get_sdk_config_error"
				}),
				(Ot[xt.authenticationFailure] = {
					domain: Bt + ".op_web_js_script_error",
					code: 10003,
					level: K.error,
					message: "h5jssdk_authentication_failure"
				}),
				(Ot[Pt.success] = { domain: Bt + ".api", code: 1e4, level: K.normal, message: "api_success" }),
				(Ot[Pt.fail] = { domain: Bt + ".api", code: 10002, level: K.error, message: "api_fail" }),
				(Ot[Pt.cancel] = { domain: Bt + ".api", code: 10001, level: K.warn, message: "api_cancel" }),
				(Ot[Pt.timeout] = { domain: Bt + ".api", code: 10003, level: K.error, message: "api_timeout" }),
				(Ot[xt.sdkEnter] = { domain: Bt + ".op_h5sdk_common", code: 1e4, level: K.normal, message: "h5jssdk_enter" }),
				(Ot[xt.sdkReady] = { domain: Bt + ".op_h5sdk_common", code: 10001, level: K.normal, message: "h5jssdk_ready" }),
				(Ot.DEFAULT = { domain: Bt, code: 1e4, level: K.warn, message: "undefined_default_code" }),
				Ot),
		Wt = "op_web_api_invoke_result",
		zt = [],
		qt = function (e, t) {
			return (
				void 0 === e && (e = ""),
				void 0 === t && (t = Vt.DEFAULT),
				new _e(e ? { name: e, code: new be(t) } : { name: "undefined_default_code", code: new be(Vt.DEFAULT) })
			);
		},
		Ut = n(function (e, t) {
			Object.defineProperty(t, "__esModule", { value: !0 });
			let n = (function () {
				function e() {
					(this._configReady = !0),
						(this._configEvent = "LarkConfigReady"),
						(this._invokeQueue = []),
						window.addEventListener(this._configEvent, this._onBridgeReady.bind(this), !1);
				}
				return (
					(e.prototype._fireEvent = function (e, t) {
						let n = new CustomEvent(e, t);
						window.dispatchEvent(n);
					}),
					(e.prototype._submitTask = function (e) {
						this._invokeQueue.push(e);
					}),
					(e.prototype._onBridgeReady = function () {
						this._invokeQueue.forEach(function (e) {
							e();
						});
					}),
					(e.prototype.register = function (e, t) { }),
					(e.prototype.connectLkWebViewJavascriptBridge = function (e) { }),
					(e.prototype.invoke = function (e, t, n) { }),
					(e.prototype.config = function (e, t, n) {
						let r = this;
						this.invoke(e, t, {
							onSuccess: function () {
								(r._configReady = !0), n.onSuccess && n.onSuccess(), r._fireEvent(r._configEvent, {});
							},
							onFail: function (e) {
								(r._configReady = !0), n.onFail && n.onFail(e), r._fireEvent(r._configEvent, {});
							}
						}),
							(this._configReady = !1);
					}),
					e
				);
			})();
			t.BaseBridgeImpl = n;
		}),
		Jt = n(function (t, n) {
			let r,
				i =
					(e && e.__extends) ||
					((r =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (e, t) {
								e.__proto__ = t;
							}) ||
						function (e, t) {
							for (let n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
						}),
						function (e, t) {
							function n() {
								this.constructor = e;
							}
							r(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n()));
						}),
				o =
					(e && e.__assign) ||
					Object.assign ||
					function (e) {
						for (var t, n = 1, r = arguments.length; n < r; n++)
							for (let i in (t = arguments[n])) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						return e;
					};
			Object.defineProperty(n, "__esModule", { value: !0 });
			let a = (function (e) {
				function t() {
					let t = e.call(this) || this;
					return window.addEventListener("WebViewJavascriptBridgeReady", t._onBridgeReady.bind(t), !1), t;
				}
				return (
					i(t, e),
					(t.prototype.invoke = function (e, t, n) {
						let r = o({}, t);
						n &&
							((r.onSuccess = this._wrapCallback(n.onSuccess, n.keep)),
								(r.onFailed = this._wrapCallback(n.onFail, n.keep)),
								n.onProgress && (r.onProgress = this._wrapProgress(n.onProgress)),
								(r.callback = r.onSuccess)),
							this._invokeiOS(e, r);
					}),
					(t.prototype._invokeiOS = function (e, t) {
						window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.invoke
							? window.webkit.messageHandlers.invoke.postMessage({ method: e, args: t })
							: this._iOSReady(function () {
								window.WebViewJavascriptBridge.invoke({ method: e, args: t });
							});
					}),
					(t.prototype._iOSReady = function (e) {
						window.WebViewJavascriptBridge && this._configReady ? e() : this._submitTask(e);
					}),
					(t.prototype._wrapCallback = function (e, t) {
						void 0 === t && (t = !1);
						let n = "func_" + Date.now() + "_" + Math.floor(1e4 * Math.random());
						return (
							(window[n] = function () {
								for (var r = [], i = 0; i < arguments.length; i++) r[i] = arguments[i];
								"function" == typeof e && e.apply(void 0, r), t || (window[n] = null);
							}),
							n
						);
					}),
					(t.prototype._wrapProgress = function (e) {
						let t = "func_progress" + Date.now() + "_" + Math.floor(1e4 * Math.random());
						return (
							(window[t] = function (n) {
								"function" == typeof e && n && (e(n.data), 0 == +n.state && (window[t] = null));
							}),
							t
						);
					}),
					t
				);
			})(Ut.BaseBridgeImpl);
			n.iOSBridgeImpl = a;
		}),
		Ht = n(function (t, n) {
			let r,
				i =
					(e && e.__extends) ||
					((r =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (e, t) {
								e.__proto__ = t;
							}) ||
						function (e, t) {
							for (let n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
						}),
						function (e, t) {
							function n() {
								this.constructor = e;
							}
							r(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n()));
						});
			Object.defineProperty(n, "__esModule", { value: !0 });
			let o = (function (e) {
				function t() {
					let t = e.call(this) || this;
					return document.addEventListener("LkWebViewJavascriptBridgeReady", t._onBridgeReady.bind(t), !1), t;
				}
				return (
					i(t, e),
					(t.prototype.register = function (e, t) {
						this._androidReady(function () {
							window.LkWebViewJavascriptBridge.registerHandler(e, t);
						});
					}),
					(t.prototype.connectLkWebViewJavascriptBridge = function (e) {
						let t = this;
						window.LkWebViewJavascriptBridge
							? (e(window.LkWebViewJavascriptBridge),
								this.register("fireEvent", function (e, n) {
									t._fireEvent(e.name, e.data);
								}))
							: (this._submitTask(function () {
								e(window.LkWebViewJavascriptBridge);
							}),
								this.register("fireEvent", function (e, n) {
									t._fireEvent(e.name, e.data);
								}));
					}),
					(t.prototype.invoke = function (e, t, n) {
						this._androidReady(function () {
							n
								? window.LkWebViewJavascriptBridge.callHandler(e, t, n.onSuccess, n.keep, {
									onSuccess: n.onSuccess,
									onFailed: n.onFail,
									onProgress: n.onProgress
								})
								: window.LkWebViewJavascriptBridge.callHandler(e, t);
						});
					}),
					(t.prototype._androidReady = function (e) {
						if (
							!window.LkWebViewJavascriptBridge ||
							!window.LkWebViewJavascriptBridge.callHandler ||
							!window.LkWebViewJavascriptBridge.registerHandler
						)
							return (
								this._configReady
									? console.log("add LkWebViewJavascriptBridgeReady listener")
									: console.log("add _configEvent listener Bridge is not ready"),
								void this._submitTask(e)
							);
						this._configReady ? e() : (console.log("add _configEvent listener Bridge is ready"), this._submitTask(e));
					}),
					t
				);
			})(Ut.BaseBridgeImpl);
			n.AndroidBridegeImpl = o;
		}),
		Kt = n(function (e, t) {
			let n;
			Object.defineProperty(t, "__esModule", { value: !0 }),
				(function (e) {
					(e[(e.unknown = 0)] = "unknown"), (e[(e.android = 1)] = "android"), (e[(e.iOS = 2)] = "iOS");
				})((n = t.OperatingSystemType || (t.OperatingSystemType = {}))),
				(t.getOperatingSystemType = function () {
					let e = navigator.userAgent;
					return /android/i.test(e) ? n.android : /iPad|iPhone|iPod/.test(e) ? n.iOS : n.unknown;
				});
		}),
		Gt = n(function (e, t) {
			let n;
			Object.defineProperty(t, "__esModule", { value: !0 }),
				(t.bridge = n),
				(t.getBridge = function () {
					return (
						n ||
						((t.bridge = n =
							(function (e) {
								switch (e) {
									case Kt.OperatingSystemType.android:
										return new Ht.AndroidBridegeImpl();
									case Kt.OperatingSystemType.iOS:
										return new Jt.iOSBridgeImpl();
									default:
										throw "Cannot init bridge with Operator System Type: unkonwn";
								}
							})(Kt.getOperatingSystemType())),
							n.connectLkWebViewJavascriptBridge(function (e) {
								e._messageHandler ||
									e.init(function (e, t) {
										t({ init: "success!" });
									});
							}),
							(window._LarkJsBridge = n)),
						n
					);
				});
		}),
		Qt = ["success", "fail", "cancel", "complete"],
		Yt = { invoke: function () { }, config: function () { } };
	g.versions.mobileFeishu
		? g.versions.larkVersion &&
			w(g.versions.larkVersion, "3.46.0") >= 0 &&
			((null != (Nt = window) && Nt.Lark_Bridge) ||
				(null != (Dt = window) && null != (Rt = Dt.webkit) && null != (jt = Rt.messageHandlers) && jt.invokeNative))
			? ((window.isNewBridge = !0), (Yt = new Ft()))
			: (Yt = Gt.getBridge())
		: (Yt = window.__LarkPCSDK__ ? window.__LarkPCSDK__.bridge : { invoke: function () { }, config: function () { } });
	let Zt = { __v2__: !0 },
		$t = 0,
		Xt = function (e, t) {
			return function () {
				return e(t.apply(void 0, arguments));
			};
		},
		en = function () { };
	let tn = {},
		nn = {},
		rn = function (e, t, n, r) {
			let i,
				o = { api_name: e };
			return (
				t === Pt.success
					? zt.includes(e) && "monitorReport" !== e && qt(Wt, Vt[Pt.success]).addMap(o).setResultType(Pt.success).flush()
					: t === Pt.fail
						? "monitorReport" !== e &&
						qt(Wt, Vt[Pt.fail])
							.addMap(o)
							.setError(
								((i = r),
								{
									name: (i = i || {}).name,
									code: void 0 !== i.code ? i.code : i.errorCode,
									message: i.message || i.errorMessage || i.errorMsg,
									fileName: i.fileName,
									stack: i.stack,
									lineNumber: i.lineNumber,
									columnNumber: i.columnNumber
								})
							)
							.setResultType(Pt.fail)
							.flush()
						: "monitorReport" !== e && qt(Wt, Vt[t]).addMap(o).setResultType(t).flush(),
				r
			);
		};
	(Yt.on = function (e, t, n) {
		if ("function" == typeof n)
			if (((nn[e] = nn[e] || []), 0 === nn[e].length)) {
				let r = {
					keep: !0,
					onSuccess: function () {
						for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
						nn[e].forEach(function (e) {
							return "function" == typeof e && e.apply(void 0, n);
						});
					},
					origialCallback: n
				};
				window.isNewBridge && Object.assign(r, { eventName: e }), nn[e].push(n), Yt.invoke(t, {}, r);
			} else nn[e].push(n);
	}),
		(Yt.off = function (e, t, n) {
			window.isNewBridge && Yt.removeListener(e, n),
				n
					? ((nn[e] = nn[e] || []),
						(nn[e] = nn[e].filter(function (e) {
							return e !== n;
						})))
					: delete nn[e],
				(nn[e] && 0 !== nn[e].length) || Yt.invoke(t, {}, {});
		});
	let on = Yt.invoke;
	Yt.invoke = r(
		a.mark(function e() {
			let t,
				n,
				r,
				i = arguments;
			return a.wrap(function (e) {
				for (; ;)
					switch ((e.prev = e.next)) {
						case 0:
							for (t = i.length, n = new Array(t), r = 0; r < t; r++) n[r] = i[r];
							if (
								("function" == typeof n[3] && (tn[n[1].callbackId] = n[3]), +new Date(), !g.versions.ios || window.isNewBridge)
							) {
								e.next = 6;
								break;
							}
							return (e.next = 6), m();
						case 6:
							"config" !== n[0] &&
								"getSDKConfig" !== n[0] &&
								"monitorReport" !== n[0] &&
								((n[2] = n[2] || {}),
									(n[2].onSuccess = Xt(n[2].onSuccess || en, function (e) {
										return rn(n[0], Pt.success, 0, e);
									})),
									(n[2].onFail = Xt(n[2].onFail || en, function (e) {
										return rn(n[0], Pt.fail, 0, e);
									}))),
								on.apply(Yt, n);
						case 8:
						case "end":
							return e.stop();
					}
			}, e);
		})
	);
	var an = Yt,
		sn = {
			invoke: function (e, t, n) {
				let r = t.success,
					i = void 0 === r ? function () { } : r,
					o = t.fail,
					a = void 0 === o ? function () { } : o,
					s = t.cancel,
					c = void 0 === s ? function () { } : s;
				t.complete;
				let u = p(t, Qt),
					l = L(u),
					f = $t++,
					d = +new Date();
				tn[f] = [e, i, a, c, d];
				let h = Object.assign({}, l, { params: window.isNewBridge ? t : l }, Zt, { callbackId: f });
				an.invoke(e, h, {}, n);
			},
			invokeHandler: function (e, t) {
				t = F(t);
				let n = tn[e];
				if (n) {
					let r = n[0],
						i = n[1],
						o = n[2],
						a = n[3];
					n[4];
					delete tn[e];
					let s = t.errMsg,
						c = s.startsWith(r + ":ok"),
						u = s.startsWith(r + ":fail"),
						l = s.startsWith(r + ":cancel");
					c
						? ("function" == typeof i && i(t), rn(r, Pt.success, 0, t))
						: u
							? ("function" == typeof o && o(t), rn(r, Pt.fail, 0, t))
							: ("function" == typeof a && a(t), rn(r, l ? Pt.cancel : Pt.timeout, 0, t));
				}
			},
			subscribe: function (e, t, n) {
				if ((nn[e] && nn[e].length > 0 ? nn[e].push(n) : (nn[e] = [n]), window.isNewBridge)) {
					let r = { success: n };
					Object.assign(r, { isListener: !0, eventName: e, progress: n }), sn.invoke(t, r);
				}
			},
			unsubscribe: function (e, t, n) {
				let r = nn[e] || [];
				(nn[e] = r.filter(function (e) {
					return e !== n;
				})),
					0 === nn[e].length && delete tn[e],
					window.isNewBridge && an.removeListener(e, n);
			},
			subscribeHandler: function (e, t) {
				let n = nn[e] || [];
				(t = F(t)),
					n.length &&
					n.forEach(function (e) {
						"function" == typeof e && e(t);
					});
			}
		},
		cn = 16e4;
	function un(e) {
		if ("string" == typeof e) {
			if (e.length < 814) throw new Error("非法的base64String");
			return ~~((e.length - 814) / 1.37);
		}
		return 0;
	}
	let ln,
		fn = {
			navigation: new ((function () {
				function e() { }
				let t = e.prototype;
				return (
					(t.setTitle = function (e) {
						an.invoke("biz.navigation.setTitle", e);
					}),
					(t.setLeft = function (e) {
						an.invoke(
							"biz.navigation.setLeft",
							{ control: e.control, text: e.text, isShowIcon: e.isShowIcon },
							{ onSuccess: e.onSuccess, keep: !0 }
						);
					}),
					(t.setRight = function (e) {
						an.invoke("biz.navigation.setRight", e);
					}),
					(t.setMenu = function (e) {
						(function (e) {
							for (var t, n = h(e); !(t = n()).done;) {
								let r = t.value;
								if (r.imageBase64 && un(r.imageBase64) > cn) throw new Error("imageSize超过160000");
								if (r.imageBase64 && r.text) throw new Error("text和imageBase64只能传一个");
							}
							return !0;
						})(e.items) &&
							(an.off("biz.navigation.setMenu"),
								an.invoke("biz.navigation.setMenu", { items: e.items }, { onSuccess: e.onSuccess, keep: !0 }));
					}),
					(t.goBack = function (e) {
						an.invoke("biz.navigation.goBack", {}, { onSuccess: e.onSuccess });
					}),
					(t.close = function (e) {
						an.invoke("biz.navigation.close", {}, { onSuccess: e.onSuccess });
					}),
					l(e)
				);
			})())(),
			util: new ((function () {
				function e() { }
				let t = e.prototype;
				return (
					(t.uploadImage = function (e) {
						an.invoke("biz.util.uploadImage", { multiple: e.multiple, max: e.max }, { onSuccess: e.onSuccess });
					}),
					(t.copyText = function (e) {
						an.invoke("biz.util.copyText", e);
					}),
					(t.share = function (e) {
						let t = e.url,
							n = e.title,
							r = e.content,
							i = e.image,
							o = e.onSuccess;
						an.invoke("biz.util.share", { url: t, title: n, content: r, image: i }, { onSuccess: o });
					}),
					(t.getCookies = function (e) {
						an.invoke("biz.util.getCookies", {}, { onSuccess: e.onSuccess });
					}),
					(t.scan = function (e) {
						void 0 === e && (e = {});
						let t = {};
						e.type && (t.type = "string" == typeof e.type ? [e.type] : e.type),
							void 0 !== e.barCodeInput && (t.barCodeInput = e.barCodeInput),
							an.invoke("biz.util.scan", t, { onSuccess: e.onSuccess });
					}),
					(t.datePicker = function (e) {
						an.invoke("biz.util.datePicker", { format: e.format, value: e.value }, { onSuccess: e.onSuccess });
					}),
					(t.timePicker = function (e) {
						an.invoke("biz.util.timePicker", { format: e.format, value: e.value }, { onSuccess: e.onSuccess });
					}),
					(t.dateTimePicker = function (e) {
						an.invoke("biz.util.dateTimePicker", { format: e.format, value: e.value }, { onSuccess: e.onSuccess });
					}),
					(t.chosen = function (e) {
						an.invoke("biz.util.chosen", { source: e.source, selectedKey: e.selectedKey }, { onSuccess: e.onSuccess });
					}),
					(t.multiSelect = function (e) {
						an.invoke("biz.util.multiSelect", { options: e.options, selectOption: e.selectOption }, { onSuccess: e.onSuccess });
					}),
					(t.getAppLanguage = function (e) {
						an.invoke("biz.util.getAppLanguage", {}, { onSuccess: e.onSuccess });
					}),
					(t.setAuthenticationInfo = function (e) {
						an.invoke("biz.util.setAuthenticationInfo", JSON.parse(JSON.stringify(e)), {
							onSuccess: e.onSuccess,
							onFail: e.onFail
						});
					}),
					(t.startBiometrics = function (e) {
						an.invoke("biz.util.startBiometrics", JSON.parse(JSON.stringify(e)), { onSuccess: e.onSuccess, onFail: e.onFail });
					}),
					(t.savePageSnapshot = function (e) {
						an.invoke("biz.util.savePageSnapshot", {}, { onSuccess: e.onSuccess, onFail: e.onFail });
					}),
					(t.sharePageSnapshot = function (e) {
						an.invoke("biz.util.sharePageSnapshot", {}, { onSuccess: e.onSuccess, onFail: e.onFail });
					}),
					(t.downloadFile = function (e) {
						console.log("source code", e);
						let t = "downloadFile" + Date.now() + "_" + Math.floor(1e4 * Math.random());
						return (
							an.invoke(
								"biz.util.downloadFile",
								{ url: e.url, taskId: t },
								{ onSuccess: e.onSuccess, onFail: e.onFail, onProgress: e.onProgress }
							),
							{
								abort: function () {
									an.invoke("biz.util.cancelDownloadFile", { taskId: t });
								}
							}
						);
					}),
					l(e)
				);
			})())(),
			reporter: new ((function () {
				function e() { }
				return (
					(e.prototype.sendEvent = function (e, t, n) {
						an.invoke("biz.reporter.sendEvent", { category: e, action: t, params: n });
					}),
					l(e)
				);
			})())(),
			chat: new ((function () {
				function e() { }
				let t = e.prototype;
				return (
					(t.openSingleChat = function (e) {
						an.invoke("biz.chat.openSingleChat", { chatterId: e.chatterId }, { onSuccess: e.onSuccess });
					}),
					(t.toConversation = function (e) {
						an.invoke("biz.chat.toConversation", { chatId: e.chatId }, { onSuccess: e.onSuccess });
					}),
					l(e)
				);
			})())(),
			contact: new ((function () {
				function e() { }
				return (
					(e.prototype.choose = function (e) {
						an.invoke("biz.contact.choose", JSON.parse(JSON.stringify(e)), { onSuccess: e.onSuccess });
					}),
					l(e)
				);
			})())()
		},
		dn = new ((function () {
			function e() { }
			let t = e.prototype;
			return (
				(t.showPreloader = function (e) {
					an.invoke("device.notification.showPreloader", e);
				}),
				(t.hidePreloader = function () {
					an.invoke("device.notification.hidePreloader", {});
				}),
				(t.confirm = function (e) {
					an.invoke(
						"device.notification.confirm",
						{ message: e.message, title: e.title, buttonLabels: e.buttonLabels },
						{ onSuccess: e.onSuccess }
					);
				}),
				(t.alert = function (e) {
					an.invoke("device.notification.alert", e);
				}),
				(t.toast = function (e) {
					an.invoke("device.notification.toast", Object.assign({}, e, { duration: 2 }));
				}),
				(t.prompt = function (e) {
					an.invoke(
						"device.notification.prompt",
						{ message: e.message, title: e.title, buttonLabels: e.buttonLabels },
						{ onSuccess: e.onSuccess }
					);
				}),
				(t.vibrate = function (e) {
					an.invoke("device.notification.vibrate", { duration: e.duration }, { onSuccess: e.onSuccess });
				}),
				(t.actionSheet = function (e) {
					an.invoke(
						"device.notification.actionSheet",
						{ title: e.title, cancelButton: e.cancelButton, otherButtons: e.otherButtons },
						{ onSuccess: e.onSuccess }
					);
				}),
				l(e)
			);
		})())();
	!(function (e) {
		(e.wifi = "wifi"), (e.lbs = "lbs"), (e.gps = "gps");
	})(ln || (ln = {}));
	let hn,
		pn = new ((function () {
			function e() { }
			let t = e.prototype;
			return (
				(t.get = function (e) {
					an.invoke("device.geolocation.get", { useCache: e.useCache }, { onSuccess: e.onSuccess, onFail: e.onFail });
				}),
				(t.start = function (e) {
					let t = e.useCache,
						n = e.interval,
						r = e.sceneId,
						i = e.onSuccess,
						o = e.onFail;
					an.invoke("device.geolocation.start", { useCache: t, interval: n, sceneId: r }, { onSuccess: i, onFail: o, keep: !0 });
				}),
				(t.stop = function (e) {
					an.invoke("device.geolocation.stop", { sceneId: e.sceneId }, { onSuccess: e.onSuccess, onFail: e.onFail });
				}),
				l(e)
			);
		})())(),
		vn = new ((function () {
			function e() { }
			let t = e.prototype;
			return (
				(t.getNetworkType = function (e) {
					an.invoke("device.connection.getNetworkType", {}, { onSuccess: e.onSuccess, onFail: e.onFail });
				}),
				(t.scanBluetoothDevice = function (e) {
					an.invoke("device.connection.scanBluetoothDevice", { scanTimeout: e.scanTimeout }, { onSuccess: e.onSuccess });
				}),
				(t.getBluetoothDeviceState = function (e) {
					an.invoke("device.connection.getBluetoothDeviceState", {}, { onSuccess: e.onSuccess });
				}),
				(t.connectBluetoothDevice = function (e) {
					an.invoke("device.connection.connectBluetoothDevice", { id: e.id, uuid: e.uuid }, { onSuccess: e.onSuccess });
				}),
				l(e)
			);
		})())();
	!(function (e) {
		(e.captureScreen = "event.user.captureScreen"), (e.networkStatusChange = "event.connection.networkStatusChange");
	})(hn || (hn = {}));
	let gn = {
		notification: dn,
		geolocation: pn,
		connection: vn,
		base: new ((function () {
			function e() { }
			let t = e.prototype;
			return (
				(t.getInterface = function (e) {
					an.invoke("device.base.getInterface", {}, { onSuccess: e.onSuccess });
				}),
				(t.getWifiStatus = function (e) {
					an.invoke("device.base.getWifiStatus", {}, { onSuccess: e.onSuccess });
				}),
				(t.getWifiList = function (e) {
					an.invoke("device.base.getWifiList", {}, { onSuccess: e.onSuccess });
				}),
				(t.getDeviceInfo = function (e) {
					an.invoke("device.base.getDeviceInfo", {}, { onSuccess: e.onSuccess });
				}),
				(t.onUserCaptureScreen = function (e) {
					an.on(hn.captureScreen, "device.base.onUserCaptureScreen", e);
				}),
				(t.offUserCaptureScreen = function (e) {
					an.off(hn.captureScreen, "device.base.offUserCaptureScreen", e);
				}),
				l(e)
			);
		})())(),
		screen: new ((function () {
			function e() { }
			let t = e.prototype;
			return (
				(t.lockViewOrientation = function (e) {
					an.invoke(
						"device.screen.lockViewOrientation",
						{ toHorizontal: e.toHorizontal, clockwise: e.clockwise },
						{ onSuccess: e.onSuccess, onFail: e.onFail }
					);
				}),
				(t.unlockViewOrientation = function (e) {
					an.invoke("device.screen.unlockViewOrientation", {}, { onSuccess: e.onSuccess, onFail: e.onFail });
				}),
				l(e)
			);
		})())()
	};
	let mn,
		yn = Object.freeze({
			__proto__: null,
			getRecentApplications: function (e) {
				an.invoke("appCenter.getAppList", {}, { onSuccess: e.onSuccess, keep: !0 });
			},
			putRecentApplication: function (e) {
				let t = e.appId,
					n = e.appType;
				an.invoke("appCenter.putAppRecent", { appId: t, appType: n }, { onSuccess: e.onSuccess, keep: !0 });
			}
		}),
		kn = document.createElement("iframe");
	(kn.style.display = "none"), null == (mn = document.body) || mn.appendChild(kn);
	let wn,
		bn = function (e, t) {
			return new Promise(function (n, r) {
				let i = setTimeout(function () {
					r(new Error("h5jssdk_getSDKConfig_timeout"));
				}, 3e3);
				an.invoke(
					"getSDKConfig",
					{ param: JSON.stringify({ build: t }) },
					{
						onSuccess: function (t) {
							i && clearTimeout(i);
							try {
								"android" === e && t.apiInfoList
									? n(
										t.apiInfoList.map(function (e) {
											return e.name;
										})
									)
									: 0 === t.code
										? n(
											t.data.apiInfoList.map(function (e) {
												return e.name;
											})
										)
										: n(!0);
							} catch (e) {
								r(e);
							}
						},
						onFail: function (e) {
							i && clearTimeout(i), r(e);
						}
					}
				);
			});
		},
		_n = (function () {
			let e = r(
				a.mark(function e(t, n, r) {
					let i, o, s, c, u, l, f;
					return a.wrap(
						function (e) {
							for (; ;)
								switch ((e.prev = e.next)) {
									case 0:
										return (i = {}), (e.prev = 1), (e.next = 4), bn(t, r);
									case 4:
										(o = e.sent) && (i = { openList: o, byteList: [] }), (e.next = 10);
										break;
									case 8:
										(e.prev = 8), (e.t0 = e.catch(1));
									case 10:
										if (
											((c = (s = i).openList),
												(u = void 0 === c ? [] : c),
												(l = s.byteList),
												(f = void 0 === l ? [] : l),
												"cdn" !== r)
										) {
											e.next = 13;
											break;
										}
										return e.abrupt("return", u);
									case 13:
										return e.abrupt("return", u.concat(f));
									case 14:
									case "end":
										return e.stop();
								}
						},
						e,
						null,
						[[1, 8]]
					);
				})
			);
			return function (t, n, r) {
				return e.apply(this, arguments);
			};
		})(),
		Sn = function (e) {
			let t = e.api,
				n = e.browser,
				r = e.SDK,
				i = e.build;
			return (wn =
				wn ||
				new Promise(function (e, o) {
					if (n.versions.mobileFeishu || n.versions.PCFeishu) {
						let a = (function (e) {
							let t = e.versions,
								n = t.ios,
								r = t.android,
								i = t.mac,
								o = t.win;
							return n ? c.IOS : r ? c.ANDROID : i ? c.MAC : o ? c.WINDOWS : null;
						})(n),
							s = n.versions.larkVersion;
						if (!a || !s) return o(new Error("please use h5-js-sdk in Feishu or Lark APP"));
						_n(a, s, i)
							.then(function (n) {
								void 0 === n && (n = []),
									n.length
										? (function (e, t, n) {
											e.map(function (e) {
												return e.split(".");
											}).forEach(function (e) {
												e.reduce(
													function (t, n, r) {
														if (null === t) return t;
														let i = t.feishu,
															o = t.api;
														return void 0 === o[n]
															? null
															: e.length === r + 1
																? ((i[n] = o[n]), null)
																: (void 0 === i[n] && (i[n] = {}), { feishu: i[n], api: o[n] });
													},
													{ feishu: t, api: n }
												);
											});
										})(n, r, t)
										: Object.keys(t).forEach(function (e) {
											r[e] = t[e];
										}),
									e();
							})
							.catch(function (e) {
								Object.keys(t).forEach(function (e) {
									r[e] = t[e];
								}),
									o(e);
							});
					} else o(new Error("please use h5-js-sdk in Feishu or Lark APP"));
				}));
		},
		Cn = { onSuccess: { type: "Function" }, onFail: { type: "Function" } },
		An = [
			{ name: "device.base.getSystemInfo", args: Cn },
			{ name: "biz.util.getClipboardInfo", args: Cn },
			{
				name: "biz.util.openDocument",
				args: Object.assign(
					{
						url: { type: "String", required: !0 },
						method: { type: "String" },
						fileType: { type: "String" },
						header: { type: "Object" },
						body: { type: "String" },
						onProgress: { type: "Function" }
					},
					Cn
				)
			},
			{ name: "biz.contact.open", args: Object.assign({ mode: { type: "String", default: "look", required: !0 } }, Cn) },
			{ name: "biz.user.getUserInfo", args: Cn },
			{
				name: "biz.user.openDetail",
				args: Object.assign({ openId: { type: "String", required: !0 }, position: { type: "Object" } }, Cn)
			},
			{ name: "biz.user.getUserInfoEx", args: Cn },
			{ name: "device.health.getStepCount", args: Cn },
			{ name: "device.connection.getConnectedWifi", args: Cn },
			{ name: "device.connection.getGatewayIP", args: Cn },
			{
				name: "biz.util.previewImage",
				args: Object.assign({ urls: { type: "Array" }, current: { type: "String" }, requests: { type: "Array" } }, Cn)
			},
			{
				name: "biz.util.openLink",
				args: Object.assign({ url: { type: "String", required: !0 }, title: { type: "String" }, newTab: { type: "Boolean" } }, Cn)
			}
		];
	function Mn(e, t) {
		return (
			t.forEach(function (t) {
				let n = t.name,
					r = t.service,
					i = t.eventName,
					o = void 0 === i ? "" : i,
					a = n.split("."),
					s = e;
				a.forEach(function (e, i) {
					if (i === a.length - 1) {
						if (s[e]) return k("the API [" + n + "] has exist, please check and modify");
						let c = e.match(/^(on|off)[A-Z]/),
							u = c ? an[c[1]] : an.invoke,
							l = [null != r ? r : n];
						c && l.unshift(o),
							(s[e] = function (e) {
								if (
									!t.args ||
									((r = e),
										(i = t.args),
										(o = n),
										(a = !0),
										(s = ""),
										(f = y(r)),
										(d = i.type || y(i)),
										"Undefined" === f
											? "Object" === d
												? (r = {})
												: i.required && ((s = "【" + o + "】：the argument expect a " + d + " but received a " + f), (a = !1))
											: f !== d && ((s = "【" + o + "】：the argument expect a " + d + " but received a " + f), (a = !1)),
										a &&
										"Object" === d &&
										Object.keys(i).forEach(function (e) {
											let t = i[e];
											t.default && void 0 === r[e] && (r[e] = t.default), t.alias && (r[t.alias] = r[e]);
											let n = y(r[e]);
											"Undefined" === n
												? t.required && ((s = "【" + o + "】：the param [" + e + "] is required and must be " + t.type), (a = !1))
												: t.type !== n &&
												((s = "【" + o + "】：the param [" + e + "] expect " + t.type + " but received " + n), (a = !1));
										}),
										a || (r && "function" == typeof r.onFail ? r.onFail({ errorCode: 1015, errorMessage: s }) : k(s)),
										a)
								) {
									var r, i, o, a, s, f, d;
									if (c) return u.call.apply(u, [an].concat(l, [e]));
									let h = (function (e) {
										let t = {},
											n = {};
										return (
											Object.keys(e).forEach(function (r) {
												"function" == typeof e[r] ? (n[r] = e[r]) : (t[r] = e[r]);
											}),
											{ normal: t, callbacks: n }
										);
									})(e || {}),
										p = h.normal,
										v = h.callbacks;
									return u.call.apply(u, [an].concat(l, [p, v]));
								}
							});
					} else s = s[e] || (s[e] = {});
				});
			}),
			e
		);
	}
	let En = {};
	let In = n(function (e) {
		(e.exports = function (e) {
			if (Array.isArray(e)) return e;
		}),
			(e.exports.__esModule = !0),
			(e.exports.default = e.exports);
	}),
		Tn = n(function (e) {
			(e.exports = function (e) {
				if (("undefined" != typeof Symbol && null != e[Symbol.iterator]) || null != e["@@iterator"]) return Array.from(e);
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		xn = n(function (e) {
			(e.exports = function () {
				throw new TypeError(
					"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
				);
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		Pn = n(function (e) {
			(e.exports = function (e) {
				return In(e) || Tn(e) || d(e) || xn();
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		Ln = n(function (e) {
			let t = i.default;
			(e.exports = function (e, n) {
				if ("object" !== t(e) || null === e) return e;
				let r = e[Symbol.toPrimitive];
				if (void 0 !== r) {
					let i = r.call(e, n || "default");
					if ("object" !== t(i)) return i;
					throw new TypeError("@@toPrimitive must return a primitive value.");
				}
				return ("string" === n ? String : Number)(e);
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		Fn = n(function (e) {
			let t = i.default;
			(e.exports = function (e) {
				let n = Ln(e, "string");
				return "symbol" === t(n) ? n : String(n);
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		On = t(
			n(function (e) {
				function t() {
					t = function () {
						return e;
					};
					var e = {
						elementsDefinitionOrder: [["method"], ["field"]],
						initializeInstanceElements: function (e, t) {
							["method", "field"].forEach(function (n) {
								t.forEach(function (t) {
									t.kind === n && "own" === t.placement && this.defineClassElement(e, t);
								}, this);
							}, this);
						},
						initializeClassElements: function (e, t) {
							let n = e.prototype;
							["method", "field"].forEach(function (r) {
								t.forEach(function (t) {
									let i = t.placement;
									if (t.kind === r && ("static" === i || "prototype" === i)) {
										let o = "static" === i ? e : n;
										this.defineClassElement(o, t);
									}
								}, this);
							}, this);
						},
						defineClassElement: function (e, t) {
							let n = t.descriptor;
							if ("field" === t.kind) {
								let r = t.initializer;
								n = {
									enumerable: n.enumerable,
									writable: n.writable,
									configurable: n.configurable,
									value: void 0 === r ? void 0 : r.call(e)
								};
							}
							Object.defineProperty(e, t.key, n);
						},
						decorateClass: function (e, t) {
							let n = [],
								r = [],
								o = { static: [], prototype: [], own: [] };
							if (
								(e.forEach(function (e) {
									this.addElementPlacement(e, o);
								}, this),
									e.forEach(function (e) {
										if (!i(e)) return n.push(e);
										let t = this.decorateElement(e, o);
										n.push(t.element), n.push.apply(n, t.extras), r.push.apply(r, t.finishers);
									}, this),
									!t)
							)
								return { elements: n, finishers: r };
							let a = this.decorateConstructor(n, t);
							return r.push.apply(r, a.finishers), (a.finishers = r), a;
						},
						addElementPlacement: function (e, t, n) {
							let r = t[e.placement];
							if (!n && -1 !== r.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")");
							r.push(e.key);
						},
						decorateElement: function (e, t) {
							for (var n = [], r = [], i = e.decorators, o = i.length - 1; o >= 0; o--) {
								let a = t[e.placement];
								a.splice(a.indexOf(e.key), 1);
								let s = this.fromElementDescriptor(e),
									c = this.toElementFinisherExtras((0, i[o])(s) || s);
								(e = c.element), this.addElementPlacement(e, t), c.finisher && r.push(c.finisher);
								let u = c.extras;
								if (u) {
									for (let l = 0; l < u.length; l++) this.addElementPlacement(u[l], t);
									n.push.apply(n, u);
								}
							}
							return { element: e, finishers: r, extras: n };
						},
						decorateConstructor: function (e, t) {
							for (var n = [], r = t.length - 1; r >= 0; r--) {
								let i = this.fromClassDescriptor(e),
									o = this.toClassDescriptor((0, t[r])(i) || i);
								if ((void 0 !== o.finisher && n.push(o.finisher), void 0 !== o.elements)) {
									e = o.elements;
									for (let a = 0; a < e.length - 1; a++)
										for (let s = a + 1; s < e.length; s++)
											if (e[a].key === e[s].key && e[a].placement === e[s].placement)
												throw new TypeError("Duplicated element (" + e[a].key + ")");
								}
							}
							return { elements: e, finishers: n };
						},
						fromElementDescriptor: function (e) {
							let t = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor };
							return (
								Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }),
								"field" === e.kind && (t.initializer = e.initializer),
								t
							);
						},
						toElementDescriptors: function (e) {
							if (void 0 !== e)
								return Pn(e).map(function (e) {
									let t = this.toElementDescriptor(e);
									return (
										this.disallowProperty(e, "finisher", "An element descriptor"),
										this.disallowProperty(e, "extras", "An element descriptor"),
										t
									);
								}, this);
						},
						toElementDescriptor: function (e) {
							let t = String(e.kind);
							if ("method" !== t && "field" !== t)
								throw new TypeError(
									'An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' +
									t +
									'"'
								);
							let n = Fn(e.key),
								r = String(e.placement);
							if ("static" !== r && "prototype" !== r && "own" !== r)
								throw new TypeError(
									'An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' +
									r +
									'"'
								);
							let i = e.descriptor;
							this.disallowProperty(e, "elements", "An element descriptor");
							let o = { kind: t, key: n, placement: r, descriptor: Object.assign({}, i) };
							return (
								"field" !== t
									? this.disallowProperty(e, "initializer", "A method descriptor")
									: (this.disallowProperty(i, "get", "The property descriptor of a field descriptor"),
										this.disallowProperty(i, "set", "The property descriptor of a field descriptor"),
										this.disallowProperty(i, "value", "The property descriptor of a field descriptor"),
										(o.initializer = e.initializer)),
								o
							);
						},
						toElementFinisherExtras: function (e) {
							return {
								element: this.toElementDescriptor(e),
								finisher: a(e, "finisher"),
								extras: this.toElementDescriptors(e.extras)
							};
						},
						fromClassDescriptor: function (e) {
							let t = { kind: "class", elements: e.map(this.fromElementDescriptor, this) };
							return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), t;
						},
						toClassDescriptor: function (e) {
							let t = String(e.kind);
							if ("class" !== t)
								throw new TypeError(
									'A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' +
									t +
									'"'
								);
							this.disallowProperty(e, "key", "A class descriptor"),
								this.disallowProperty(e, "placement", "A class descriptor"),
								this.disallowProperty(e, "descriptor", "A class descriptor"),
								this.disallowProperty(e, "initializer", "A class descriptor"),
								this.disallowProperty(e, "extras", "A class descriptor");
							let n = a(e, "finisher");
							return { elements: this.toElementDescriptors(e.elements), finisher: n };
						},
						runClassFinishers: function (e, t) {
							for (let n = 0; n < t.length; n++) {
								let r = (0, t[n])(e);
								if (void 0 !== r) {
									if ("function" != typeof r) throw new TypeError("Finishers must return a constructor.");
									e = r;
								}
							}
							return e;
						},
						disallowProperty: function (e, t, n) {
							if (void 0 !== e[t]) throw new TypeError(n + " can't have a ." + t + " property.");
						}
					};
					return e;
				}
				function n(e) {
					let t,
						n = Fn(e.key);
					"method" === e.kind
						? (t = { value: e.value, writable: !0, configurable: !0, enumerable: !1 })
						: "get" === e.kind
							? (t = { get: e.value, configurable: !0, enumerable: !1 })
							: "set" === e.kind
								? (t = { set: e.value, configurable: !0, enumerable: !1 })
								: "field" === e.kind && (t = { configurable: !0, writable: !0, enumerable: !0 });
					let r = {
						kind: "field" === e.kind ? "field" : "method",
						key: n,
						placement: e.static ? "static" : "field" === e.kind ? "own" : "prototype",
						descriptor: t
					};
					return e.decorators && (r.decorators = e.decorators), "field" === e.kind && (r.initializer = e.value), r;
				}
				function r(e, t) {
					void 0 !== e.descriptor.get ? (t.descriptor.get = e.descriptor.get) : (t.descriptor.set = e.descriptor.set);
				}
				function i(e) {
					return e.decorators && e.decorators.length;
				}
				function o(e) {
					return void 0 !== e && !(void 0 === e.value && void 0 === e.writable);
				}
				function a(e, t) {
					let n = e[t];
					if (void 0 !== n && "function" != typeof n) throw new TypeError("Expected '" + t + "' to be a function");
					return n;
				}
				(e.exports = function (e, a, s, c) {
					let u = t();
					if (c) for (let l = 0; l < c.length; l++) u = c[l](u);
					var f = a(function (e) {
						u.initializeInstanceElements(e, d.elements);
					}, s),
						d = u.decorateClass(
							(function (e) {
								for (
									var t = [],
									n = function (e) {
										return "method" === e.kind && e.key === c.key && e.placement === c.placement;
									},
									a = 0;
									a < e.length;
									a++
								) {
									var s,
										c = e[a];
									if ("method" === c.kind && (s = t.find(n)))
										if (o(c.descriptor) || o(s.descriptor)) {
											if (i(c) || i(s)) throw new ReferenceError("Duplicated methods (" + c.key + ") can't be decorated.");
											s.descriptor = c.descriptor;
										} else {
											if (i(c)) {
												if (i(s))
													throw new ReferenceError(
														"Decorators can't be placed on different accessors with for the same property (" + c.key + ")."
													);
												s.decorators = c.decorators;
											}
											r(c, s);
										}
									else t.push(c);
								}
								return t;
							})(f.d.map(n)),
							e
						);
					return u.initializeClassElements(f.F, d.elements), u.runClassFinishers(f.F, d.finishers);
				}),
					(e.exports.__esModule = !0),
					(e.exports.default = e.exports);
			})
		),
		Nn = ["success", "fail", "cancel", "complete"];
	function Dn(e, t, n) {
		sn.invoke(e, t, n);
	}
	function Rn(e, t) {
		sn.subscribe(e, e, t);
	}
	function jn(e, t, n) {
		void 0 === t && (t = {});
		let r = t,
			i = r.success,
			o = r.fail,
			a = r.cancel,
			s = r.complete,
			c = p(r, Nn),
			u = Object.assign({}, c),
			l = function (e) {
				null == s || s(e), null == n || null == n.afterAll || n.afterAll(e);
			};
		(u.success = function (e) {
			null == n || null == n.beforeAll || n.beforeAll(e),
				null == n || null == n.beforeSuccess || n.beforeSuccess(e),
				null == i || i(e),
				null == n || null == n.afterSuccess || n.afterSuccess(e),
				l(e);
		}),
			(u.fail = function (e) {
				null == n || null == n.beforeAll || n.beforeAll(e),
					null == n || null == n.beforeFail || n.beforeFail(e),
					null == o || o(e),
					null == n || null == n.afterFail || n.afterFail(e),
					l(e);
			}),
			(u.cancel = function (e) {
				null == n || null == n.beforeAll || n.beforeAll(e),
					null == o || o(e),
					null == n || null == n.beforeCancel || n.beforeCancel(e),
					null == a || a(e),
					null == n || null == n.afterCancel || n.afterCancel(e),
					null == s || s(e),
					l(e);
			}),
			Dn(e, u);
	}
	function Bn(e, t) {
		Rn(e, t);
	}
	function Vn(e) {
		return Object.prototype.toString.call(e).slice(8, -1);
	}
	var Wn = function e(t, n, r) {
		void 0 === r && (r = "param");
		let i = Vn(t),
			o = Vn(n);
		if (i !== o) return r + " should pass " + o + ", not " + i;
		let a = "";
		switch (o) {
			case "Object":
				for (let s in n) Object.prototype.hasOwnProperty.call(n, s) && (a += e(t[s], n[s], r + "." + s));
				break;
			case "Array":
				if (t.length < n.length) return r + " should have more than " + n.length + " items, not " + t.length + " items";
				for (let c = 0; c < n.length; ++c) a += e(t[c], n[c], r + "[" + c + "]");
		}
		return a;
	},
		zn = function (e, t, n) {
			let r = Wn(t, n);
			return !r || (qn(e, t, r), !1);
		},
		qn = function (e, t, n) {
			void 0 === t && (t = {}), void 0 === n && (n = "");
			let r = e + ":fail " + n;
			"function" == typeof t.fail && t.fail({ errMsg: r }), "function" == typeof t.complete && t.complete({ errMsg: r });
		},
		Un = Object.freeze({
			__proto__: null,
			addHostListener: function () { },
			publish: function () { },
			subscribe: function () { },
			_mockInvokeHandler: function (e) { },
			_unmockInvokeHandler: function () { },
			invoke: Dn,
			on: Rn,
			invokeMethod: jn,
			onMethod: Bn,
			noop: function () { },
			beforeInvoke: zn,
			beforeInvokeFail: qn
		}),
		Jn = [
			"addStandardError",
			"customCheckParams",
			"checkParams",
			"checkExtendParams",
			"beforeInvokeHook",
			"paramsTransformer",
			"defaults",
			"frequencyStrategy",
			"frequencyTime",
			"frequencyReportTimeout",
			"frequencyReporter"
		],
		Hn = ["firstUseErrString"],
		Kn = function () { },
		Gn = function (e) {
			return e;
		};
	function Qn(e, t) {
		void 0 === t && (t = {});
		let n,
			r = t,
			i = r.addStandardError,
			o = r.customCheckParams,
			a = r.checkParams,
			s = r.checkExtendParams,
			c = r.beforeInvokeHook,
			u = r.paramsTransformer,
			l = r.defaults,
			f = r.frequencyStrategy,
			d = r.frequencyTime,
			h = void 0 === d ? 0 : d,
			v = r.frequencyReportTimeout,
			g = r.frequencyReporter,
			m = p(r, Jn),
			y = function (n) {
				void 0 === n && (n = {});
				let r,
					f = new Map();
				l && (n = Object.assign({}, "function" == typeof l ? l() : l, n));
				let d = {};
				if (a) {
					if (((r = ft(n, a)), i)) {
						let h = (function (e, t) {
							let n = it(e),
								r = it(t);
							if (n === r && "Object" === r) for (let i in t) if (it(e[i]) !== it(t[i])) return st(i);
							return "";
						})(n, a);
						h && (d = { errString: h, errno: dt });
					}
				} else if (s)
					if (i) {
						let p = (function (e, t) {
							for (let n in t) {
								let r = t[n];
								if (!e.hasOwnProperty(n)) {
									if (r.required) return { errMsg: n + " should not be undefined", errString: ct(n) };
									r.hasOwnProperty("defaultValue") && (e[n] = r.defaultValue);
								}
								if (e.hasOwnProperty(n)) {
									let i = it(e[n]),
										o = r.type;
									if (i !== o) return { errMsg: n + " should pass " + o + ", not " + i, errString: st(n) };
								}
							}
							return { errMsg: "", errString: "" };
						})(n, s),
							v = p.errMsg,
							g = p.errString;
						v && ((r = v), (d = { errString: g, errno: dt }));
					} else
						r = (function (e, t) {
							for (let n in t) {
								let r = t[n];
								if (r.required && !e.hasOwnProperty(n)) return n + " should not be undefined";
								if (e.hasOwnProperty(n)) {
									let i = it(e[n]),
										o = r.type;
									if (i !== o) return n + " should pass " + o + ", not " + i;
								}
							}
							return !1;
						})(n, s);
				if (!r && o) {
					let y = o(n);
					y && ((r = y.message), i && y.key && (d = { errString: at(y.key), errno: dt }));
				}
				if (r) yt(e, n, r, d);
				else {
					let k = null == c ? void 0 : c(n, f);
					if (void 0 !== k) {
						let w = t,
							b = w.beforeAll,
							_ = w.beforeSuccess,
							S = w.afterSuccess,
							C = w.afterAll,
							A = n.success;
						null == b || b(k, f),
							null == _ || _(k, f),
							"function" == typeof A && A(k),
							null == S || S(k, f),
							null == C || C(k, f);
					} else {
						let M;
						u && (n = null != (M = u(n, f)) ? M : n), jn(e, n, m);
					}
				}
			};
		if ("queue" === f) {
			let k = [],
				w = !1,
				b = function e() {
					w = !0;
					let t,
						r = k.shift();
					(null == n || n(), r)
						? y(
							Object.assign({}, r, {
								complete: function (t) {
									null == r || null == r.complete || r.complete(t),
										setTimeout(function () {
											e();
										}, h);
								}
							})
						)
						: 0 === k.length
							? ((w = !1), null == (t = n) || t.cancel())
							: e();
				};
			return (
				g &&
				v &&
				(n = U(function () {
					g({ apiName: e, timeout: v, waitingLength: k.length });
				}, v)),
				function (e) {
					void 0 === e && (e = {}), null == n || n(), k.push(e), w || b();
				}
			);
		}
		if ("throttle" === f) {
			let _,
				S,
				C = [],
				A = 0,
				M = !1,
				E = function () {
					let t;
					for (null == (t = n) || t.cancel(); C.length;) {
						let r = C.shift();
						"fail" === S ? yt(e, r, "", _) : kt(e, r, _);
					}
				};
			return (
				g &&
				v &&
				(n = U(function () {
					g({ apiName: e, timeout: v, waitingLength: C.length });
				}, v)),
				function (e) {
					void 0 === e && (e = {});
					let t = Date.now();
					C.push(e),
						!A || t - A > h
							? ((A = t),
								(M = !1),
								null == n || n(),
								y(
									Object.assign({}, e, {
										success: function (e) {
											(_ = e), (S = "success"), (M = !0), E();
										},
										fail: function (e) {
											(_ = e), (S = "fail"), (M = !0), E();
										}
									})
								))
							: M && E();
				}
			);
		}
		return y;
	}
	function Yn(e, t, n, r) {
		void 0 === r && (r = {});
		let i,
			o = r,
			a = o.firstUseErrString,
			s = p(o, Hn);
		return (
			(i =
				"function" == typeof n
					? n
					: "string" == typeof n
						? function (e) {
							return e[n];
						}
						: !0 === n
							? Gn
							: Kn),
			function () {
				let n,
					r,
					o = !1;
				if (
					(jn(
						e,
						Object.assign({}, t.apply(void 0, arguments), s, {
							success: function (e) {
								(n = e), (o = !0);
							},
							fail: function (e) {
								(r = e), (o = !0);
							}
						})
					),
						r)
				) {
					let c = (a && r.errString) || r.errMsg;
					if (c) {
						let u = new Error(c);
						throw (r.errString, (u.errString = r.errString), r.errno, (u.errno = r.errno), u);
					}
					throw new Error(e + ":fail unknown");
				}
				if (!o) throw new Error(e + ":fail empty result");
				return i(n);
			}
		);
	}
	function Zn(e, t, n) {
		void 0 === n && (n = {});
		let r = n,
			i = r.wrapper,
			o = r.whenListenerExisted,
			a = r.whenListenerEmptied,
			s = r.whenListenerAdd,
			c = r.whenListenerRemove,
			u = r.onPolicy,
			l = r.offPolicy,
			f = new WeakMap(),
			d = "emptied";
		function h() {
			"existed" === d ? e.size(t) || ((d = "emptied"), null == a || a()) : e.size(t) && ((d = "existed"), null == o || o());
		}
		return {
			on: function (n) {
				if ("function" == typeof n) {
					let r = f.get(n);
					if ((r || (i ? ((r = i(n)), f.set(n, r)) : (r = n)), "latest" === u)) e.off(t), null == c || c();
					else if ("unique" === u && e.size(t, r) > 0) return;
					e.on(t, r), null == s || s(), h();
				}
			},
			off: function (n) {
				if (void 0 === n || "clearAll" === l) e.off(t), null == c || c();
				else if ("function" == typeof n) {
					let r,
						i = null != (r = f.get(n)) ? r : n;
					i && e.off(t, i), null == c || c();
				}
				h();
			}
		};
	}
	function $n(e) {
		return (
			void 0 === e && (e = {}),
			function (t, n) {
				let r = t.key;
				t.finisher = function (t) {
					t.exportApi(r, e);
				};
			}
		);
	}
	let Xn = (function (e) {
		_(n, e),
			(n.exportApi = function (e, t) {
				this.hasOwnProperty("exports") ||
					Object.defineProperty(this, "exports", {
						enumerable: !1,
						writable: !0,
						configurable: !0,
						value: this.exports ? this.exports.slice() : []
					}),
					this.exports.push({ name: e, options: t });
			}),
			(n.injectDep = function (e, t) {
				this.hasOwnProperty("deps") ||
					Object.defineProperty(this, "deps", {
						enumerable: !1,
						writable: !0,
						configurable: !0,
						value: this.deps ? this.deps.slice() : []
					}),
					this.deps.push({ name: e, type: t });
			});
		let t = n.prototype;
		function n(t) {
			let n;
			return (
				((n = e.call(this) || this).container = t),
				(n.beforeInvoke = zn),
				(n.beforeInvokeFail = qn),
				(n.createInvokeMethodApi = Qn),
				(n.createInvokeMethodSyncApi = Yn),
				(n._eventEmitter = void 0),
				n
			);
		}
		return (
			(t.createEventApi = function (e, t) {
				return Zn(this.emitter, e, t);
			}),
			(t.createNativeEventApi = function (e, t) {
				let n = this,
					r = "__internal_" + e + "__";
				return (
					this.addSetupHandler(function () {
						n.onMethod(e, function (e) {
							let i,
								o = null != (i = null == t || null == t.transformData ? void 0 : t.transformData(e)) ? i : e;
							null == t || null == t.whenEventEmit || t.whenEventEmit(o),
								n.emitter.emit(r, e),
								null == t || null == t.whenEventEmitted || t.whenEventEmitted(o);
						});
					}),
					Zn(this.emitter, r, t)
				);
			}),
			l(n, [
				{
					key: "invokeMethod",
					get: function () {
						return this.container.bridge.invokeMethod;
					}
				},
				{
					key: "subscribe",
					get: function () {
						return this.container.bridge.subscribe;
					}
				},
				{
					key: "onMethod",
					get: function () {
						return this.container.bridge.onMethod;
					}
				},
				{
					key: "publish",
					get: function () {
						return this.container.bridge.publish;
					}
				},
				{
					key: "emitter",
					get: function () {
						let e = this;
						return (
							this._eventEmitter ||
							(this._eventEmitter = new X({
								wrapper: function (t) {
									return rt(t, { context: null, errMsg: "at tt event api", data: e.container });
								}
							})),
							this._eventEmitter
						);
					}
				}
			]),
			n
		);
	})(pe);
	function er(e, t) {
		let n = e + "() { [native code] }";
		Object.defineProperty(t, "toString", {
			configurable: !0,
			writable: !0,
			enumerable: !1,
			value: function () {
				return n;
			}
		});
	}
	(Xn.exports = void 0), (Xn.deps = void 0);
	let tr,
		nr = (function (e) {
			function t(t, n) {
				let r;
				return (
					((r = e.call(this) || this).container = t),
					(r.exports = void 0),
					(r.instance = new Map()),
					(r.apis = void 0),
					(r.apis = Array.from(new Set(n))),
					r
				);
			}
			_(t, e),
				(t.getExports = function (e, n) {
					let r = new t(e, n);
					return ve(r), r.exports;
				});
			let n = t.prototype;
			return (
				(n.setup = function () {
					this.createApis(), this.setupApis(), (this.exports = this.composeApis());
				}),
				(n.teardown = function () {
					for (var e, t = h(this.apis); !(e = t()).done;) {
						let n = e.value;
						this.instance.get(n)._runTeardown();
					}
				}),
				(n.createApis = function () {
					for (var e, t = h(this.apis); !(e = t()).done;) {
						let n = e.value;
						this.instance.set(n, new n(this.container));
					}
					for (var r, i = h(this.apis); !(r = i()).done;) {
						let o = r.value,
							a = this.instance.get(o),
							s = o.deps;
						if (null != s && s.length)
							for (var c, u = h(s); !(c = u()).done;) {
								let l = c.value,
									f = l.name,
									d = (0, l.type)();
								if (!d) throw new Error("Cannot found dep class in " + f + " of " + o.name);
								let p = this.instance.get(d);
								if (!p) throw new Error("Cannot found dep in " + f + " with type " + d.name + " in " + o.name);
								a[f] = p;
							}
					}
				}),
				(n.setupApis = function () {
					for (var e, t = h(this.apis); !(e = t()).done;) {
						let n = e.value;
						ve(this.instance.get(n));
					}
				}),
				(n.composeApis = function () {
					for (var e, t = {}, n = h(this.apis); !(e = n()).done;) {
						let r = e.value,
							i = this.instance.get(r),
							o = i.constructor.exports;
						if (o)
							for (var a, s = h(o); !(a = s()).done;) {
								let c = a.value.name,
									u = i[c];
								if ("function" == typeof u) {
									let l = bt(u.bind(i), "at tt." + c);
									er(c, l), (t[c] = l);
								} else if (null != u)
									if (u.on) {
										let f = u,
											d = f.on,
											p = f.off,
											v = c[0].toUpperCase() + c.slice(1),
											g = "on" + v;
										if (((t[g] = d), er(g, d), p)) {
											let m = "off" + v;
											(t[m] = p), er(m, p);
										}
									} else t[c] = u;
							}
					}
					return t;
				}),
				l(t)
			);
		})(pe),
		rr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "authorize",
							value: function () {
								return this.createInvokeMethodApi("authorize", { checkParams: { scope: "" } });
							}
						}
					]
				};
			},
			Xn
		),
		ir = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getSystemInfo",
							value: function () {
								let e = this;
								return this.createInvokeMethodApi("getSystemInfo", {
									beforeSuccess: function (t) {
										let n,
											r = e.container.getJSSDKVersion();
										(t.SDKVersion = r.SDKVersion),
											(t.SDKUpdateVersion = r.SDKUpdateVersion),
											(t.platform = null == (n = t.platform) ? void 0 : n.toLocaleLowerCase()),
											(t.devicePixelRatio = t.pixelRatio);
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getSystemInfoSync",
							value: function () {
								let e = this;
								return function () {
									let t = {};
									return (
										e.invokeMethod(
											"getSystemInfoSync",
											{},
											{
												beforeSuccess: function (n) {
													let r;
													void 0 === n && (n = {});
													let i = e.container.getJSSDKVersion();
													(n.platform = null == (r = n.platform) ? void 0 : r.toLocaleLowerCase()),
														(n.SDKVersion = i.SDKVersion),
														(n.SDKUpdateVersion = i.SDKUpdateVersion),
														(n.devicePixelRatio = n.pixelRatio),
														(t = n);
												}
											}
										),
										t
									);
								};
							}
						}
					]
				};
			},
			Xn
		),
		or = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "openSchema",
							value: function () {
								return this.createInvokeMethodApi("openSchema");
							}
						}
					]
				};
			},
			Xn
		),
		ar = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getPadDisplayScaleMode",
							value: function () {
								return this.createInvokeMethodApi("getPadDisplayScaleMode");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "togglePadFullScreen",
							value: function () {
								return this.createInvokeMethodApi("togglePadFullScreen");
							}
						}
					]
				};
			},
			Xn
		),
		sr = n(function (e) {
			(e.exports = function (e, t) {
				for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = Ke(e)););
				return e;
			}),
				(e.exports.__esModule = !0),
				(e.exports.default = e.exports);
		}),
		cr = t(
			n(function (e) {
				function t() {
					return (
						"undefined" != typeof Reflect && Reflect.get
							? ((e.exports = t = Reflect.get.bind()), (e.exports.__esModule = !0), (e.exports.default = e.exports))
							: ((e.exports = t =
								function (e, t, n) {
									let r = sr(e, t);
									if (r) {
										let i = Object.getOwnPropertyDescriptor(r, t);
										return i.get ? i.get.call(arguments.length < 3 ? e : n) : i.value;
									}
								}),
								(e.exports.__esModule = !0),
								(e.exports.default = e.exports)),
						t.apply(this, arguments)
					);
				}
				(e.exports = t), (e.exports.__esModule = !0), (e.exports.default = e.exports);
			})
		),
		ur = "mainNavItemClick",
		lr = "navBarClick",
		fr = "leftNavBarClick",
		dr = "rightNavBarClick",
		hr = On(
			null,
			function (e, t) {
				let n = (function (t) {
					function n(n) {
						let r;
						(r = t.call(this, n) || this), e($(r));
						let i = r.createEventApi(ur);
						(r.onMainNavRightItemClick = i.on), (r.offMainNavRightItemClick = i.off);
						let o = r.createEventApi(lr, { onPolicy: "latest" });
						(r.onNavigationBarClick = o.on), (r.offNavigationBarClick = o.off);
						let a = r.createEventApi(fr, { onPolicy: "latest" });
						(r.onLeftNavigationBarClick = a.on), (r.offLeftNavigationBarClick = a.off);
						let s = r.createEventApi(dr, { onPolicy: "latest" });
						return (r.onRightNavigationBarClick = s.on), (r.offRightNavigationBarClick = s.off), r;
					}
					return _(n, t), l(n);
				})(t);
				return {
					F: n,
					d: [
						{
							kind: "field",
							key: "_titleConfig",
							value: function () {
								return {};
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "setNavigationBarTitle",
							value: function () {
								return this.createInvokeMethodApi("setNavigationBarTitle", { checkParams: { title: "String" } });
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "setNavigationBarColor",
							value: function () {
								return this.createInvokeMethodApi("setNavigationBarColor", {
									checkParams: { frontColor: "String", backgroundColor: "String" }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "setMainNavRightItems",
							value: function () {
								return this.createInvokeMethodApi("setMainNavRightItems");
							}
						},
						{ kind: "field", decorators: [$n()], key: "onMainNavRightItemClick", value: function () { } },
						{ kind: "field", decorators: [$n()], key: "offMainNavRightItemClick", value: function () { } },
						{
							kind: "field",
							decorators: [$n()],
							key: "showNavigationBarLoading",
							value: function () {
								return this.createInvokeMethodApi("showNavigationBarLoading");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "hideNavigationBarLoading",
							value: function () {
								return this.createInvokeMethodApi("hideNavigationBarLoading");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "hideHomeButton",
							value: function () {
								return this.createInvokeMethodApi("hideHomeButton");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "setNavigationBar",
							value: function () {
								let e = this;
								return this.createInvokeMethodApi("setNavigationBar", {
									paramsTransformer: function (t) {
										return (e._titleConfig = t), t;
									}
								});
							}
						},
						{ kind: "field", decorators: [$n()], key: "onNavigationBarClick", value: void 0 },
						{ kind: "field", decorators: [$n()], key: "offNavigationBarClick", value: void 0 },
						{ kind: "field", decorators: [$n()], key: "onLeftNavigationBarClick", value: void 0 },
						{ kind: "field", decorators: [$n()], key: "offLeftNavigationBarClick", value: void 0 },
						{ kind: "field", decorators: [$n()], key: "onRightNavigationBarClick", value: void 0 },
						{ kind: "field", decorators: [$n()], key: "offRightNavigationBarClick", value: void 0 },
						{
							kind: "method",
							key: "setup",
							value: function () {
								let e = this;
								cr(Ge(n.prototype), "setup", this).call(this),
									this.onMethod("onMainNavRightItemClick", function (t) {
										e.emitter.emit(ur, t);
									}),
									this.onMethod("onNavigationBarClick", function (t) {
										e.emitter.emit(lr, t);
									}),
									this.onMethod("onLeftNavigationBarClick", function (t) {
										e.emitter.emit(fr, t);
									}),
									this.onMethod("onRightNavigationBarClick", function (t) {
										e.emitter.emit(dr, t);
									}),
									this.onMethod("resolveNavigationBarConfig", function () {
										e.invokeMethod("resolveNavigationBarConfig", { navigationBarConfig: e._titleConfig });
									});
							}
						},
						{
							kind: "method",
							key: "composeSafariCache",
							value: function () {
								return { navigationBarConfig: this._titleConfig };
							}
						}
					]
				};
			},
			Xn
		),
		pr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getUserInfo",
							value: function () {
								return this.createInvokeMethodApi("getUserInfo");
							}
						}
					]
				};
			},
			Xn
		),
		vr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "showModal",
							value: function (e) {
								void 0 === e && (e = {});
								(e = Object.assign(
									{},
									{
										title: "",
										content: "",
										confirmText: "",
										cancelText: "",
										showCancel: !0,
										confirmColor: "#3CC51F",
										cancelColor: "#000000"
									},
									e
								)),
									this.beforeInvoke(
										"showModal",
										e,
										{
											title: "String",
											content: "String",
											confirmText: "String",
											cancelText: "String",
											confirmColor: "String",
											cancelColor: "String"
										},
										!0
									) &&
									(It(e.confirmText) > 8
										? this.beforeInvokeFail("showModal", e, "confirmText length should not larger than 4 Chinese characters", {
											errno: dt,
											errString: at("confirmText")
										})
										: It(e.cancelText) > 8
											? this.beforeInvokeFail("showModal", e, "cancelText length should not larger than 4 Chinese characters", {
												errno: dt,
												errString: at("cancelText")
											})
											: this.invokeMethod("showModal", e));
							}
						}
					]
				};
			},
			Xn
		),
		gr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "enterBot",
							value: function () {
								return this.createInvokeMethodApi("enterBot");
							}
						}
					]
				};
			},
			Xn
		),
		mr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "enterChat",
							value: function () {
								return this.createInvokeMethodApi("enterChat");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "toggleChat",
							value: function () {
								return this.createInvokeMethodApi("toggleChat", { checkParams: { openChatId: "" } });
							}
						}
					]
				};
			},
			gr
		),
		yr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "enterChat",
							value: function (e) {
								void 0 === e && (e = {});
								let t = e,
									n = t.openid,
									r = t.openChatId;
								n || r
									? (((null == void 0 ? void 0 : undefined.agent) || {}).isEnterChatStandardizeEnabled ||
										(n && r && delete e.openChatId),
										void 0 === e.needBadge && (e.needBadge = !0),
										this.invokeMethod("enterChat", e))
									: this.beforeInvokeFail("enterChat", e, "no valid id", { errno: ht, errString: ut() });
							}
						}
					]
				};
			},
			gr
		),
		kr = (function (e) {
			function t() {
				return e.apply(this, arguments) || this;
			}
			return _(t, e), l(t);
		})(Xn),
		wr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "enterProfile",
							value: function () {
								return this.createInvokeMethodApi("enterProfile", { checkParams: { openid: "" } });
							}
						}
					]
				};
			},
			kr
		),
		br = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "enterProfile",
							value: function (e) {
								void 0 === e && (e = {}), void 0 === e.left && (e.left = 0), void 0 === e.top && (e.top = 0);
								this.beforeInvoke("enterProfile", e, { openid: "String", left: 0, top: 0 }) &&
									this.invokeMethod("enterProfile", e);
							}
						}
					]
				};
			},
			kr
		),
		_r = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "startPasswordVerify",
							value: function () {
								return this.createInvokeMethodApi("startPasswordVerify");
							}
						}
					]
				};
			},
			Xn
		),
		Sr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "chooseContact",
							value: function (e) {
								void 0 === e && (e = {}),
									void 0 === e.externalContact && (e.externalContact = !0),
									void 0 === e.multi && (e.multi = !0),
									void 0 === e.ignore && (e.ignore = !1),
									(e.multi = Boolean(e.multi)),
									!1 === e.multi && (e.choosenIds = null);
								let t = !1;
								null !== e.choosenIds &&
									null !== e.disableChosenIds &&
									e.choosenIds instanceof Array &&
									e.disableChosenIds instanceof Array &&
									e.choosenIds.forEach(function (n) {
										-1 !== e.disableChosenIds.indexOf(n) && (t = !0);
									}),
									!1 === t
										? this.invokeMethod("chooseContact", e)
										: qn("chooseContact", e, "choosenIds and disableIds intersect");
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "chooseChat",
							value: function (e) {
								void 0 === e && (e = {}),
									void 0 === e.externalChat && (e.externalChat = !0),
									void 0 === e.allowCreateGroup && (e.allowCreateGroup = !0),
									void 0 === e.ignoreSelf && (e.ignoreSelf = !1),
									void 0 === e.ignoreBot && (e.ignoreBot = !1),
									void 0 === e.multiSelect && (e.multiSelect = !1),
									void 0 === e.selectType && (e.selectType = 0),
									this.invokeMethod("chooseChat", e);
							}
						}
					]
				};
			},
			Xn
		),
		Cr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "filePicker",
							value: function () {
								return this.createInvokeMethodApi("filePicker");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "openDocument",
							value: function () {
								return this.createInvokeMethodApi("openDocument", { addStandardError: !0, checkParams: { filePath: "String" } });
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "docsPicker",
							value: function (e) {
								let t = e.maxNum;
								void 0 === t || t > 0
									? this.invokeMethod("docsPicker", e)
									: yt("docsPicker", e, "no valid maxNum", { errString: at("maxNum"), errno: dt });
							}
						}
					]
				};
			},
			Xn
		),
		Ar = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "saveFileAs",
							value: function () {
								return this.createInvokeMethodApi("saveFileAs", { checkParams: { filePath: "String" } });
							}
						}
					]
				};
			},
			Xn
		),
		Mr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getHostLaunchQuery",
							value: function () {
								return this.createInvokeMethodApi("getHostLaunchQuery");
							}
						},
						{
							kind: "field",
							decorators: [$n({ sync: !0 })],
							key: "getHostLaunchQuerySync",
							value: function () {
								return null;
							}
						}
					]
				};
			},
			Xn
		),
		Er = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getSecurityInfo",
							value: function () {
								return this.createInvokeMethodApi("getSecurityInfo");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getSecurityEnv",
							value: function () {
								return this.createInvokeMethodApi("getSecurityEnv");
							}
						}
					]
				};
			},
			Xn
		),
		Ir = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							key: "_leaveConfirmConfig",
							value: function () {
								return {};
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "enableLeaveConfirm",
							value: function (e) {
								let t = this;
								void 0 === e && (e = {});
								e = Object.assign(
									{},
									{
										effect: ["back", "close"],
										title: "",
										content: "",
										confirmText: "",
										cancelText: "",
										confirmColor: "#3CC51F",
										cancelColor: "#000000"
									},
									e
								);
								let n = function (n, r) {
									return (
										It(e[n]) > r &&
										(t.beforeInvokeFail(
											"enableLeaveConfirm",
											e,
											"invalid parameter: " + n + " length can not exceed " + r + " characters"
										),
											!0)
									);
								};
								this.beforeInvoke("enableLeaveConfirm", e, {
									effect: [],
									title: "String",
									content: "String",
									confirmText: "String",
									cancelText: "String",
									confirmColor: "String",
									cancelColor: "String"
								}) &&
									(0 === e.effect.length
										? this.beforeInvokeFail("enableLeaveConfirm", e, "invalid parameter: effect length can not be empty")
										: e.title || e.content
											? n("title", 16) ||
											n("content", 80) ||
											n("confirmText", 8) ||
											n("cancelText", 8) ||
											this.invokeMethod("enableLeaveConfirm", e, {
												beforeSuccess: function () {
													t._leaveConfirmConfig = e;
												}
											})
											: this.beforeInvokeFail(
												"enableLeaveConfirm",
												e,
												"invalid parameter: title and content can not be empty at the same time"
											));
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "disableLeaveConfirm",
							value: function () {
								let e = this;
								return this.createInvokeMethodApi("disableLeaveConfirm", {
									beforeSuccess: function () {
										e._leaveConfirmConfig = {};
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "LeaveConfirmCancel",
							value: function () {
								return this.createNativeEventApi("onLeaveConfirmCancel");
							}
						},
						{
							kind: "field",
							key: "composeSafariCache",
							value: function () {
								let e = this;
								return function () {
									return { leaveConfirmConfig: e._leaveConfirmConfig };
								};
							}
						}
					]
				};
			},
			Xn
		),
		Tr = (function () {
			function e() { }
			let t = e.prototype;
			return (
				(t._reportUndefinedDefaultCode = function () {
					let e = { domain: "js.open_platform.gadget", code: 1e4, level: K.warn, message: "undefined_default_code" };
					return new _e({ name: "undefined_default_code", code: e });
				}),
				(t._buildParams = function (e, t) {
					let n;
					return void 0 === t && (t = {}), ((n = {}).biz_event_name = e), (n.biz_data = t), (n.common_data = {}), n;
				}),
				(t.report = function (e, t, n, r) {
					void 0 === n && (n = {}), e || this._reportUndefinedDefaultCode();
					let i = new _e({ name: "op_biz_event", code: new be(t) });
					null != r && r.traceId && i.tracing(r.traceId);
					let o = this._buildParams(e, n);
					return i.addMap(o).flush();
				}),
				l(e)
			);
		})(),
		xr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{ kind: "field", key: "ins", value: void 0 },
						{
							kind: "field",
							decorators: [$n()],
							key: "opmonitor",
							value: function () {
								let e = this;
								return function () {
									return e.ins || (e.ins = new Tr()), e.ins;
								};
							}
						}
					]
				};
			},
			Xn
		),
		Pr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "closeWindow",
							value: function () {
								return this.createInvokeMethodApi("closeWindow");
							}
						}
					]
				};
			},
			Xn
		),
		Lr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{ kind: "field", key: "metaConfig", value: void 0 },
						{
							kind: "field",
							decorators: [$n()],
							key: "updateMeta",
							value: function () {
								let e = this;
								return function () {
									let t = document.querySelectorAll("meta[lk-config]"),
										n = new Map();
									t.forEach(function (e) {
										let t,
											r,
											i = e.getAttribute("name"),
											o = null != (t = e.getAttribute("content")) ? t : "",
											a = null != (r = e.getAttribute("lk-config")) ? r : "";
										if (i) {
											let s = { name: i, content: o, "lk-config": a };
											n.set(i, s);
										}
									});
									let r = Array.from(n.values());
									(e.metaConfig = r), e._updateMeta({ metas: r });
								};
							}
						},
						{
							kind: "field",
							key: "_updateMeta",
							value: function () {
								return this.createInvokeMethodApi("updateMeta");
							}
						},
						{
							kind: "field",
							key: "composeSafariCache",
							value: function () {
								let e = this;
								return function () {
									return { meta: e.metaConfig };
								};
							}
						}
					]
				};
			},
			Xn
		),
		Fr = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "setAPIConfig",
							value: function () {
								return this.createInvokeMethodApi("setAPIConfig");
							}
						}
					]
				};
			},
			Xn
		),
		Or = On(
			null,
			function (e, t) {
				let n = (function (t) {
					function n() {
						for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
						return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
					}
					return _(n, t), l(n);
				})(t);
				return {
					F: n,
					d: [
						{
							kind: "field",
							key: "eventMap",
							value: function () {
								return {};
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "invokeCustomAPI",
							value: function () {
								return this.createInvokeMethodApi("invokeCustomAPI");
							}
						},
						{
							kind: "method",
							decorators: [$n({})],
							key: "addCustomEventListener",
							value: function (e, t) {
								this.eventMap[e] || (this.eventMap[e] = this.createEventApi(e)), this.eventMap[e].on(t);
							}
						},
						{
							kind: "method",
							decorators: [$n({})],
							key: "removeCustomEventListener",
							value: function (e, t) {
								let n;
								null == (n = this.eventMap[e]) || null == n.off || n.off(t);
							}
						},
						{
							kind: "method",
							key: "setup",
							value: function () {
								let e = this;
								cr(Ge(n.prototype), "setup", this).call(this),
									this.onMethod("fireCustomEvent", function (t) {
										let n = t.eventName,
											r = t.data;
										e.emitter.emit(n, r);
									});
							}
						}
					]
				};
			},
			Xn
		),
		Nr = n(function (e, t) {
			!(function (t) {
				let n = Object.hasOwnProperty,
					r = Array.isArray
						? Array.isArray
						: function (e) {
							return "[object Array]" === Object.prototype.toString.call(e);
						},
					i = "object" == typeof process && "function" == typeof process.nextTick,
					o = "function" == typeof Symbol,
					a = "object" == typeof Reflect,
					s = "function" == typeof setImmediate ? setImmediate : setTimeout,
					c = o
						? a && "function" == typeof Reflect.ownKeys
							? Reflect.ownKeys
							: function (e) {
								let t = Object.getOwnPropertyNames(e);
								return t.push.apply(t, Object.getOwnPropertySymbols(e)), t;
							}
						: Object.keys;
				function u() {
					(this._events = {}), this._conf && l.call(this, this._conf);
				}
				function l(e) {
					e &&
						((this._conf = e),
							e.delimiter && (this.delimiter = e.delimiter),
							e.maxListeners !== t && (this._maxListeners = e.maxListeners),
							e.wildcard && (this.wildcard = e.wildcard),
							e.newListener && (this._newListener = e.newListener),
							e.removeListener && (this._removeListener = e.removeListener),
							e.verboseMemoryLeak && (this.verboseMemoryLeak = e.verboseMemoryLeak),
							e.ignoreErrors && (this.ignoreErrors = e.ignoreErrors),
							this.wildcard && (this.listenerTree = {}));
				}
				function f(e, t) {
					let n =
						"(node) warning: possible EventEmitter memory leak detected. " +
						e +
						" listeners added. Use emitter.setMaxListeners() to increase limit.";
					if (
						(this.verboseMemoryLeak && (n += " Event name: " + t + "."), "undefined" != typeof process && process.emitWarning)
					) {
						let r = new Error(n);
						(r.name = "MaxListenersExceededWarning"), (r.emitter = this), (r.count = e), process.emitWarning(r);
					} else console.error(n), console.trace && console.trace();
				}
				let d = function (e, t, n) {
					let r = arguments.length;
					switch (r) {
						case 0:
							return [];
						case 1:
							return [e];
						case 2:
							return [e, t];
						case 3:
							return [e, t, n];
						default:
							for (var i = new Array(r); r--;) i[r] = arguments[r];
							return i;
					}
				};
				function h(e, n) {
					for (var r = {}, i = e.length, o = n ? value.length : 0, a = 0; a < i; a++) r[e[a]] = a < o ? n[a] : t;
					return r;
				}
				function p(e, t, n) {
					let r, i;
					if (
						((this._emitter = e),
							(this._target = t),
							(this._listeners = {}),
							(this._listenersCount = 0),
							(n.on || n.off) && ((r = n.on), (i = n.off)),
							t.addEventListener
								? ((r = t.addEventListener), (i = t.removeEventListener))
								: t.addListener
									? ((r = t.addListener), (i = t.removeListener))
									: t.on && ((r = t.on), (i = t.off)),
							!r && !i)
					)
						throw Error("target does not implement any known event API");
					if ("function" != typeof r) throw TypeError("on method must be a function");
					if ("function" != typeof i) throw TypeError("off method must be a function");
					(this._on = r), (this._off = i);
					let o = e._observers;
					o ? o.push(this) : (e._observers = [this]);
				}
				function v(e, r, i, o) {
					let a = Object.assign({}, r);
					if (!e) return a;
					if ("object" != typeof e) throw TypeError("options must be an object");
					let s,
						c,
						u,
						l = Object.keys(e),
						f = l.length;
					function d(e) {
						throw Error('Invalid "' + s + '" option value' + (e ? ". Reason: " + e : ""));
					}
					for (let h = 0; h < f; h++) {
						if (((s = l[h]), !o && !n.call(r, s))) throw Error('Unknown "' + s + '" option');
						(c = e[s]) !== t && ((u = i[s]), (a[s] = u ? u(c, d) : c));
					}
					return a;
				}
				function g(e, t) {
					return ("function" == typeof e && e.hasOwnProperty("prototype")) || t("value must be a constructor"), e;
				}
				function m(e) {
					let t = "value must be type of " + e.join("|"),
						n = e.length,
						r = e[0],
						i = e[1];
					return 1 === n
						? function (e, n) {
							if (typeof e === r) return e;
							n(t);
						}
						: 2 === n
							? function (e, n) {
								let o = typeof e;
								if (o === r || o === i) return e;
								n(t);
							}
							: function (r, i) {
								for (let o = typeof r, a = n; a-- > 0;) if (o === e[a]) return r;
								i(t);
							};
				}
				Object.assign(p.prototype, {
					subscribe: function (e, t, n) {
						let r = this,
							i = this._target,
							o = this._emitter,
							a = this._listeners,
							s = function () {
								let r = d.apply(null, arguments),
									a = { data: r, name: t, original: e };
								if (n) {
									let s = n.call(i, a);
									!1 !== s && o.emit.apply(o, [a.name].concat(r));
								} else o.emit.apply(o, [t].concat(r));
							};
						if (a[e]) throw Error("Event '" + e + "' is already listening");
						this._listenersCount++,
							o._newListener && o._removeListener && !r._onNewListener
								? ((this._onNewListener = function (n) {
									n === t && null === a[e] && ((a[e] = s), r._on.call(i, e, s));
								}),
									o.on("newListener", this._onNewListener),
									(this._onRemoveListener = function (n) {
										n === t && !o.hasListeners(n) && a[e] && ((a[e] = null), r._off.call(i, e, s));
									}),
									(a[e] = null),
									o.on("removeListener", this._onRemoveListener))
								: ((a[e] = s), r._on.call(i, e, s));
					},
					unsubscribe: function (e) {
						let t,
							n,
							r,
							i = this,
							o = this._listeners,
							a = this._emitter,
							s = this._off,
							u = this._target;
						if (e && "string" != typeof e) throw TypeError("event must be a string");
						function l() {
							i._onNewListener &&
								(a.off("newListener", i._onNewListener),
									a.off("removeListener", i._onRemoveListener),
									(i._onNewListener = null),
									(i._onRemoveListener = null));
							let e = b.call(a, i);
							a._observers.splice(e, 1);
						}
						if (e) {
							if (!(t = o[e])) return;
							s.call(u, e, t), delete o[e], --this._listenersCount || l();
						} else {
							for (r = (n = c(o)).length; r-- > 0;) (e = n[r]), s.call(u, e, o[e]);
							(this._listeners = {}), (this._listenersCount = 0), l();
						}
					}
				});
				let y = m(["function"]),
					k = m(["object", "function"]);
				function w(e, t, n) {
					var r,
						i,
						o,
						a = 0,
						s = new e(function (c, u, l) {
							function f() {
								i && (i = null), a && (clearTimeout(a), (a = 0));
							}
							(n = v(
								n,
								{ timeout: 0, overload: !1 },
								{
									timeout: function (e, t) {
										return (
											("number" != typeof (e *= 1) || e < 0 || !Number.isFinite(e)) && t("timeout must be a positive number"), e
										);
									}
								}
							)),
								(r = !n.overload && "function" == typeof e.prototype.cancel && "function" == typeof l);
							let d = function (e) {
								f(), c(e);
							},
								h = function (e) {
									f(), u(e);
								};
							r
								? t(d, h, l)
								: ((i = [
									function (e) {
										h(e || Error("canceled"));
									}
								]),
									t(d, h, function (e) {
										if (o) throw Error("Unable to subscribe on cancel event asynchronously");
										if ("function" != typeof e) throw TypeError("onCancel callback must be a function");
										i.push(e);
									}),
									(o = !0)),
								n.timeout > 0 &&
								(a = setTimeout(function () {
									let e = Error("timeout");
									(e.code = "ETIMEDOUT"), (a = 0), s.cancel(e), u(e);
								}, n.timeout));
						});
					return (
						r ||
						(s.cancel = function (e) {
							if (i) {
								for (let t = i.length, n = 1; n < t; n++) i[n](e);
								i[0](e), (i = null);
							}
						}),
						s
					);
				}
				function b(e) {
					let t = this._observers;
					if (!t) return -1;
					for (let n = t.length, r = 0; r < n; r++) if (t[r]._target === e) return r;
					return -1;
				}
				function _(e, t, n, r, i) {
					if (!n) return null;
					if (0 === r) {
						let o = typeof t;
						if ("string" === o) {
							var a,
								s,
								u = 0,
								l = 0,
								f = this.delimiter,
								d = f.length;
							if (-1 !== (s = t.indexOf(f))) {
								a = new Array(5);
								do {
									(a[u++] = t.slice(l, s)), (l = s + d);
								} while (-1 !== (s = t.indexOf(f, l)));
								(a[u++] = t.slice(l)), (t = a), (i = u);
							} else (t = [t]), (i = 1);
						} else "object" === o ? (i = t.length) : ((t = [t]), (i = 1));
					}
					let h,
						p,
						v,
						g,
						m,
						y,
						k,
						w = null,
						b = t[r],
						S = t[r + 1];
					if (r === i && n._listeners)
						return "function" == typeof n._listeners
							? (e && e.push(n._listeners), [n])
							: (e && e.push.apply(e, n._listeners), [n]);
					if ("*" === b) {
						for (s = (y = c(n)).length; s-- > 0;)
							"_listeners" !== (h = y[s]) && (k = _(e, t, n[h], r + 1, i)) && (w ? w.push.apply(w, k) : (w = k));
						return w;
					}
					if ("**" === b) {
						for (
							(m = r + 1 === i || (r + 2 === i && "*" === S)) && n._listeners && (w = _(e, t, n, i, i)), s = (y = c(n)).length;
							s-- > 0;

						)
							"_listeners" !== (h = y[s]) &&
								("*" === h || "**" === h
									? (n[h]._listeners && !m && (k = _(e, t, n[h], i, i)) && (w ? w.push.apply(w, k) : (w = k)),
										(k = _(e, t, n[h], r, i)))
									: (k = _(e, t, n[h], h === S ? r + 2 : r, i)),
									k && (w ? w.push.apply(w, k) : (w = k)));
						return w;
					}
					if ((n[b] && (w = _(e, t, n[b], r + 1, i)), (p = n["*"]) && _(e, t, p, r + 1, i), (v = n["**"])))
						if (r < i)
							for (v._listeners && _(e, t, v, i, i), s = (y = c(v)).length; s-- > 0;)
								"_listeners" !== (h = y[s]) &&
									(h === S
										? _(e, t, v[h], r + 2, i)
										: h === b
											? _(e, t, v[h], r + 1, i)
											: (((g = {})[h] = v[h]), _(e, t, { "**": g }, r + 1, i)));
						else v._listeners ? _(e, t, v, i, i) : v["*"] && v["*"]._listeners && _(e, t, v["*"], i, i);
					return w;
				}
				function S(e, t, n) {
					let r,
						i,
						o = 0,
						a = 0,
						s = this.delimiter,
						c = s.length;
					if ("string" == typeof e)
						if (-1 !== (r = e.indexOf(s))) {
							i = new Array(5);
							do {
								(i[o++] = e.slice(a, r)), (a = r + c);
							} while (-1 !== (r = e.indexOf(s, a)));
							i[o++] = e.slice(a);
						} else (i = [e]), (o = 1);
					else (i = e), (o = e.length);
					if (o > 1) for (r = 0; r + 1 < o; r++) if ("**" === i[r] && "**" === i[r + 1]) return;
					let u,
						l = this.listenerTree;
					for (r = 0; r < o; r++)
						if (((l = l[(u = i[r])] || (l[u] = {})), r === o - 1))
							return (
								l._listeners
									? ("function" == typeof l._listeners && (l._listeners = [l._listeners]),
										n ? l._listeners.unshift(t) : l._listeners.push(t),
										!l._listeners.warned &&
										this._maxListeners > 0 &&
										l._listeners.length > this._maxListeners &&
										((l._listeners.warned = !0), f.call(this, l._listeners.length, u)))
									: (l._listeners = t),
								!0
							);
					return !0;
				}
				function C(e, t, n, r) {
					for (var i, o, a, s, u = c(e), l = u.length, f = e._listeners; l-- > 0;)
						(i = e[(o = u[l])]),
							(a = "_listeners" === o ? n : n ? n.concat(o) : [o]),
							(s = r || "symbol" == typeof o),
							f && t.push(s ? a : a.join(this.delimiter)),
							"object" == typeof i && C.call(this, i, t, a, s);
					return t;
				}
				function A(e) {
					for (var t, n, r, i = c(e), o = i.length; o-- > 0;)
						(t = e[(n = i[o])]) && ((r = !0), "_listeners" === n || A(t) || delete e[n]);
					return r;
				}
				function M(e, t, n) {
					(this.emitter = e), (this.event = t), (this.listener = n);
				}
				function E(e, n, r) {
					if (!0 === r) a = !0;
					else if (!1 === r) o = !0;
					else {
						if (!r || "object" != typeof r) throw TypeError("options should be an object or true");
						var o = r.async,
							a = r.promisify,
							c = r.nextTick,
							u = r.objectify;
					}
					if (o || c || a) {
						let l = n,
							f = n._origin || n;
						if (c && !i) throw Error("process.nextTick is not supported");
						a === t && (a = "AsyncFunction" === n.constructor.name),
							((n = function () {
								let e = arguments,
									t = this,
									n = this.event;
								return a
									? c
										? Promise.resolve()
										: new Promise(function (e) {
											s(e);
										}).then(function () {
											return (t.event = n), l.apply(t, e);
										})
									: (c ? process.nextTick : s)(function () {
										(t.event = n), l.apply(t, e);
									});
							})._async = !0),
							(n._origin = f);
					}
					return [n, u ? new M(this, e, n) : this];
				}
				function I(e) {
					(this._events = {}),
						(this._newListener = !1),
						(this._removeListener = !1),
						(this.verboseMemoryLeak = !1),
						l.call(this, e);
				}
				(M.prototype.off = function () {
					return this.emitter.off(this.event, this.listener), this;
				}),
					(I.EventEmitter2 = I),
					(I.prototype.listenTo = function (e, n, i) {
						if ("object" != typeof e) throw TypeError("target musts be an object");
						let o = this;
						function a(t) {
							if ("object" != typeof t) throw TypeError("events must be an object");
							let n,
								r = i.reducers,
								a = b.call(o, e);
							n = -1 === a ? new p(o, e, i) : o._observers[a];
							for (var s, u = c(t), l = u.length, f = "function" == typeof r, d = 0; d < l; d++)
								(s = u[d]), n.subscribe(s, t[s] || s, f ? r : r && r[s]);
						}
						return (
							(i = v(i, { on: t, off: t, reducers: t }, { on: y, off: y, reducers: k })),
							r(n) ? a(h(n)) : a("string" == typeof n ? h(n.split(/\s+/)) : n),
							this
						);
					}),
					(I.prototype.stopListeningTo = function (e, t) {
						let n = this._observers;
						if (!n) return !1;
						let r,
							i = n.length,
							o = !1;
						if (e && "object" != typeof e) throw TypeError("target should be an object");
						for (; i-- > 0;) (r = n[i]), (e && r._target !== e) || (r.unsubscribe(t), (o = !0));
						return o;
					}),
					(I.prototype.delimiter = "."),
					(I.prototype.setMaxListeners = function (e) {
						e !== t && ((this._maxListeners = e), this._conf || (this._conf = {}), (this._conf.maxListeners = e));
					}),
					(I.prototype.getMaxListeners = function () {
						return this._maxListeners;
					}),
					(I.prototype.event = ""),
					(I.prototype.once = function (e, t, n) {
						return this._once(e, t, !1, n);
					}),
					(I.prototype.prependOnceListener = function (e, t, n) {
						return this._once(e, t, !0, n);
					}),
					(I.prototype._once = function (e, t, n, r) {
						return this._many(e, 1, t, n, r);
					}),
					(I.prototype.many = function (e, t, n, r) {
						return this._many(e, t, n, !1, r);
					}),
					(I.prototype.prependMany = function (e, t, n, r) {
						return this._many(e, t, n, !0, r);
					}),
					(I.prototype._many = function (e, t, n, r, i) {
						let o = this;
						if ("function" != typeof n) throw new Error("many only accepts instances of Function");
						function a() {
							return 0 == --t && o.off(e, a), n.apply(this, arguments);
						}
						return (a._origin = n), this._on(e, a, r, i);
					}),
					(I.prototype.emit = function () {
						if (!this._events && !this._all) return !1;
						this._events || u.call(this);
						let e,
							t,
							n,
							r,
							i,
							a,
							s = arguments[0],
							c = this.wildcard;
						if ("newListener" === s && !this._newListener && !this._events.newListener) return !1;
						if (c && ((e = s), "newListener" !== s && "removeListener" !== s && "object" == typeof s)) {
							if (((n = s.length), o))
								for (r = 0; r < n; r++)
									if ("symbol" == typeof s[r]) {
										a = !0;
										break;
									}
							a || (s = s.join(this.delimiter));
						}
						let l,
							f = arguments.length;
						if (this._all && this._all.length)
							for (r = 0, n = (l = this._all.slice()).length; r < n; r++)
								switch (((this.event = s), f)) {
									case 1:
										l[r].call(this, s);
										break;
									case 2:
										l[r].call(this, s, arguments[1]);
										break;
									case 3:
										l[r].call(this, s, arguments[1], arguments[2]);
										break;
									default:
										l[r].apply(this, arguments);
								}
						if (c) (l = []), _.call(this, l, e, this.listenerTree, 0, n);
						else {
							if ("function" == typeof (l = this._events[s])) {
								switch (((this.event = s), f)) {
									case 1:
										l.call(this);
										break;
									case 2:
										l.call(this, arguments[1]);
										break;
									case 3:
										l.call(this, arguments[1], arguments[2]);
										break;
									default:
										for (t = new Array(f - 1), i = 1; i < f; i++) t[i - 1] = arguments[i];
										l.apply(this, t);
								}
								return !0;
							}
							l && (l = l.slice());
						}
						if (l && l.length) {
							if (f > 3) for (t = new Array(f - 1), i = 1; i < f; i++) t[i - 1] = arguments[i];
							for (r = 0, n = l.length; r < n; r++)
								switch (((this.event = s), f)) {
									case 1:
										l[r].call(this);
										break;
									case 2:
										l[r].call(this, arguments[1]);
										break;
									case 3:
										l[r].call(this, arguments[1], arguments[2]);
										break;
									default:
										l[r].apply(this, t);
								}
							return !0;
						}
						if (!this.ignoreErrors && !this._all && "error" === s)
							throw arguments[1] instanceof Error ? arguments[1] : new Error("Uncaught, unspecified 'error' event.");
						return !!this._all;
					}),
					(I.prototype.emitAsync = function () {
						if (!this._events && !this._all) return !1;
						this._events || u.call(this);
						let e,
							t,
							n,
							r,
							i,
							a,
							s = arguments[0],
							c = this.wildcard;
						if ("newListener" === s && !this._newListener && !this._events.newListener) return Promise.resolve([!1]);
						if (c && ((e = s), "newListener" !== s && "removeListener" !== s && "object" == typeof s)) {
							if (((r = s.length), o))
								for (i = 0; i < r; i++)
									if ("symbol" == typeof s[i]) {
										t = !0;
										break;
									}
							t || (s = s.join(this.delimiter));
						}
						let l,
							f = [],
							d = arguments.length;
						if (this._all)
							for (i = 0, r = this._all.length; i < r; i++)
								switch (((this.event = s), d)) {
									case 1:
										f.push(this._all[i].call(this, s));
										break;
									case 2:
										f.push(this._all[i].call(this, s, arguments[1]));
										break;
									case 3:
										f.push(this._all[i].call(this, s, arguments[1], arguments[2]));
										break;
									default:
										f.push(this._all[i].apply(this, arguments));
								}
						if ((c ? ((l = []), _.call(this, l, e, this.listenerTree, 0)) : (l = this._events[s]), "function" == typeof l))
							switch (((this.event = s), d)) {
								case 1:
									f.push(l.call(this));
									break;
								case 2:
									f.push(l.call(this, arguments[1]));
									break;
								case 3:
									f.push(l.call(this, arguments[1], arguments[2]));
									break;
								default:
									for (n = new Array(d - 1), a = 1; a < d; a++) n[a - 1] = arguments[a];
									f.push(l.apply(this, n));
							}
						else if (l && l.length) {
							if (((l = l.slice()), d > 3)) for (n = new Array(d - 1), a = 1; a < d; a++) n[a - 1] = arguments[a];
							for (i = 0, r = l.length; i < r; i++)
								switch (((this.event = s), d)) {
									case 1:
										f.push(l[i].call(this));
										break;
									case 2:
										f.push(l[i].call(this, arguments[1]));
										break;
									case 3:
										f.push(l[i].call(this, arguments[1], arguments[2]));
										break;
									default:
										f.push(l[i].apply(this, n));
								}
						} else if (!this.ignoreErrors && !this._all && "error" === s)
							return arguments[1] instanceof Error
								? Promise.reject(arguments[1])
								: Promise.reject("Uncaught, unspecified 'error' event.");
						return Promise.all(f);
					}),
					(I.prototype.on = function (e, t, n) {
						return this._on(e, t, !1, n);
					}),
					(I.prototype.prependListener = function (e, t, n) {
						return this._on(e, t, !0, n);
					}),
					(I.prototype.onAny = function (e) {
						return this._onAny(e, !1);
					}),
					(I.prototype.prependAny = function (e) {
						return this._onAny(e, !0);
					}),
					(I.prototype.addListener = I.prototype.on),
					(I.prototype._onAny = function (e, t) {
						if ("function" != typeof e) throw new Error("onAny only accepts instances of Function");
						return this._all || (this._all = []), t ? this._all.unshift(e) : this._all.push(e), this;
					}),
					(I.prototype._on = function (e, n, r, i) {
						if ("function" == typeof e) return this._onAny(e, n), this;
						if ("function" != typeof n) throw new Error("on only accepts instances of Function");
						this._events || u.call(this);
						let o,
							a = this;
						return (
							i !== t && ((n = (o = E.call(this, e, n, i))[0]), (a = o[1])),
							this._newListener && this.emit("newListener", e, n),
							this.wildcard
								? (S.call(this, e, n, r), a)
								: (this._events[e]
									? ("function" == typeof this._events[e] && (this._events[e] = [this._events[e]]),
										r ? this._events[e].unshift(n) : this._events[e].push(n),
										!this._events[e].warned &&
										this._maxListeners > 0 &&
										this._events[e].length > this._maxListeners &&
										((this._events[e].warned = !0), f.call(this, this._events[e].length, e)))
									: (this._events[e] = n),
									a)
						);
					}),
					(I.prototype.off = function (e, t) {
						if ("function" != typeof t) throw new Error("removeListener only takes instances of Function");
						let n,
							i = [];
						if (this.wildcard) {
							let o = "string" == typeof e ? e.split(this.delimiter) : e.slice();
							if (!(i = _.call(this, null, o, this.listenerTree, 0))) return this;
						} else {
							if (!this._events[e]) return this;
							(n = this._events[e]), i.push({ _listeners: n });
						}
						for (let a = 0; a < i.length; a++) {
							let s = i[a];
							if (((n = s._listeners), r(n))) {
								for (var c = -1, u = 0, l = n.length; u < l; u++)
									if (n[u] === t || (n[u].listener && n[u].listener === t) || (n[u]._origin && n[u]._origin === t)) {
										c = u;
										break;
									}
								if (c < 0) continue;
								return (
									this.wildcard ? s._listeners.splice(c, 1) : this._events[e].splice(c, 1),
									0 === n.length && (this.wildcard ? delete s._listeners : delete this._events[e]),
									this._removeListener && this.emit("removeListener", e, t),
									this
								);
							}
							(n === t || (n.listener && n.listener === t) || (n._origin && n._origin === t)) &&
								(this.wildcard ? delete s._listeners : delete this._events[e],
									this._removeListener && this.emit("removeListener", e, t));
						}
						return this.listenerTree && A(this.listenerTree), this;
					}),
					(I.prototype.offAny = function (e) {
						let t,
							n = 0,
							r = 0;
						if (e && this._all && this._all.length > 0) {
							for (n = 0, r = (t = this._all).length; n < r; n++)
								if (e === t[n]) return t.splice(n, 1), this._removeListener && this.emit("removeListenerAny", e), this;
						} else {
							if (((t = this._all), this._removeListener))
								for (n = 0, r = t.length; n < r; n++) this.emit("removeListenerAny", t[n]);
							this._all = [];
						}
						return this;
					}),
					(I.prototype.removeListener = I.prototype.off),
					(I.prototype.removeAllListeners = function (e) {
						if (e === t) return !this._events || u.call(this), this;
						if (this.wildcard) {
							let n,
								r = _.call(this, null, e, this.listenerTree, 0);
							if (!r) return this;
							for (n = 0; n < r.length; n++) r[n]._listeners = null;
							this.listenerTree && A(this.listenerTree);
						} else this._events && (this._events[e] = null);
						return this;
					}),
					(I.prototype.listeners = function (e) {
						let n,
							r,
							i,
							o,
							a,
							s = this._events;
						if (e === t) {
							if (this.wildcard) throw Error("event name required for wildcard emitter");
							if (!s) return [];
							for (o = (n = c(s)).length, i = []; o-- > 0;) "function" == typeof (r = s[n[o]]) ? i.push(r) : i.push.apply(i, r);
							return i;
						}
						if (this.wildcard) {
							if (!(a = this.listenerTree)) return [];
							let u = [],
								l = "string" == typeof e ? e.split(this.delimiter) : e.slice();
							return _.call(this, u, l, a, 0), u;
						}
						return s && (r = s[e]) ? ("function" == typeof r ? [r] : r) : [];
					}),
					(I.prototype.eventNames = function (e) {
						let t = this._events;
						return this.wildcard ? C.call(this, this.listenerTree, [], null, e) : t ? c(t) : [];
					}),
					(I.prototype.listenerCount = function (e) {
						return this.listeners(e).length;
					}),
					(I.prototype.hasListeners = function (e) {
						if (this.wildcard) {
							let n = [],
								r = "string" == typeof e ? e.split(this.delimiter) : e.slice();
							return _.call(this, n, r, this.listenerTree, 0), n.length > 0;
						}
						let i = this._events,
							o = this._all;
						return !!((o && o.length) || (i && (e === t ? c(i).length : i[e])));
					}),
					(I.prototype.listenersAny = function () {
						return this._all ? this._all : [];
					}),
					(I.prototype.waitFor = function (e, n) {
						let r = this,
							i = typeof n;
						return (
							"number" === i ? (n = { timeout: n }) : "function" === i && (n = { filter: n }),
							w(
								(n = v(n, { timeout: 0, filter: t, handleError: !1, Promise: Promise, overload: !1 }, { filter: y, Promise: g }))
									.Promise,
								function (t, i, o) {
									function a() {
										let o = n.filter;
										if (!o || o.apply(r, arguments))
											if ((r.off(e, a), n.handleError)) {
												let s = arguments[0];
												s ? i(s) : t(d.apply(null, arguments).slice(1));
											} else t(d.apply(null, arguments));
									}
									o(function () {
										r.off(e, a);
									}),
										r._on(e, a, !1);
								},
								{ timeout: n.timeout, overload: n.overload }
							)
						);
					});
				let T = I.prototype;
				Object.defineProperties(I, {
					defaultMaxListeners: {
						get: function () {
							return T._maxListeners;
						},
						set: function (e) {
							if ("number" != typeof e || e < 0 || Number.isNaN(e)) throw TypeError("n must be a non-negative number");
							T._maxListeners = e;
						},
						enumerable: !0
					},
					once: {
						value: function (e, t, n) {
							return w(
								(n = v(n, { Promise: Promise, timeout: 0, overload: !1 }, { Promise: g })).Promise,
								function (n, r, i) {
									let o;
									if ("function" == typeof e.addEventListener)
										return (
											(o = function () {
												n(d.apply(null, arguments));
											}),
											i(function () {
												e.removeEventListener(t, o);
											}),
											void e.addEventListener(t, o, { once: !0 })
										);
									let a,
										s = function () {
											a && e.removeListener("error", a), n(d.apply(null, arguments));
										};
									"error" !== t &&
										((a = function (n) {
											e.removeListener(t, s), r(n);
										}),
											e.once("error", a)),
										i(function () {
											a && e.removeListener("error", a), e.removeListener(t, s);
										}),
										e.once(t, s);
								},
								{ timeout: n.timeout, overload: n.overload }
							);
						},
						writable: !0,
						configurable: !0
					}
				}),
					Object.defineProperties(T, {
						_maxListeners: { value: 10, writable: !0, configurable: !0 },
						_observers: { value: null, writable: !0, configurable: !0 }
					}),
					(e.exports = I);
			})();
		});
	!(function (e) {
		(e[(e.Cancelled = 1000001)] = "Cancelled"),
			(e[(e.InvalidParam = 104)] = "InvalidParam"),
			(e[(e.InternalError = 102)] = "InternalError");
	})(tr || (tr = {}));
	let Dr = (function () {
		function e(t, n) {
			let r = this;
			if (
				(void 0 === n && (n = !1),
					(this.requestVersion = "v2"),
					(this.taskId = Mt()),
					(this.bizInvokeTime = new Date().valueOf()),
					(this.illegal = !1),
					(this.abort = function () {
						r.illegal || jn("downloadFileAbort", { payload: JSON.stringify({ downloadTaskId: r.taskId }) });
					}),
					(this.onProgressUpdate = function (t) {
						r.illegal ||
							"function" != typeof t ||
							e.eventNexus.on(r.taskId, function (e) {
								_t(t, "at downloadTask.onProgressUpdate callback function")(e);
							});
					}),
					n)
			)
				this.illegal = !0;
			else {
				let i = Object.assign({}, t, { taskId: this.taskId });
				jn("downloadFile", {
					payload: JSON.stringify(Object.assign({}, t, { downloadTaskId: this.taskId })),
					fail: e.callBackWrapper(i, this.bizInvokeTime, "fail"),
					success: e.callBackWrapper(i, this.bizInvokeTime, "success")
				});
			}
		}
		return (
			(e.reportResult = function (e) {
				let t = e.errCode === tr.Cancelled || e.errMsg.toLocaleLowerCase().startsWith("downloadFile:fail canceled"),
					n = t ? We : Ve,
					r = t ? "cancel" : e.resultType,
					i = Date.now() - e.bizInvokeTime,
					o = {
						request_version: "v2",
						request_trace: e.taskId,
						request_url: "string" == typeof e.url ? e.url.split("?")[0] : q(e.url),
						request_biz_invoke_time: e.bizInvokeTime,
						error_code: e.errCode ? e.errCode : 0,
						error_msg: e.errMsg || "",
						errno: e.errno,
						err_string: e.errString,
						duration: i,
						result_type: r,
						api_name: "downloadFile"
					};
				He(Pe, n).setPlatform("TeaSlardar").addMap(o).flush();
			}),
			(e.callBackWrapper = function (t, n, r) {
				return function (i) {
					let o = t.taskId,
						a = t.success,
						s = t.fail,
						c = t.complete,
						u = i.payload,
						l = i.errCode,
						f = i.errno,
						d = i.errString,
						h = null,
						p = i.errMsg;
					if ("string" == typeof u)
						try {
							h = JSON.parse(u);
						} catch (e) {
							(p = "downloadFile:fail sdk parse payload error"),
								R.error("[js-sdk-downloadFile] biz callback payload json parse error");
						}
					let v = h ? Object.assign({}, h, { trace: o, errMsg: p }) : { errMsg: p, trace: o };
					if ((void 0 !== f && (v.errno = f), void 0 !== d && (v.errString = d), "success" === r && h && "function" == typeof a))
						a(v);
					else if ("function" == typeof s) {
						s(void 0 === l ? v : Object.assign({}, v, { errCode: l }));
					}
					"function" == typeof c && c(v),
						e.eventNexus.off(t.taskId),
						e.reportResult({
							resultType: r,
							errMsg: p,
							bizInvokeTime: n,
							errCode: l,
							errno: f,
							errString: d,
							taskId: t.taskId,
							url: t.url
						});
				};
			}),
			l(e)
		);
	})();
	(Dr.eventNexus = new X()),
		(Dr.progressCacheMap = new Map()),
		Bn("onDownloadFileProgress", function (e) {
			let t;
			void 0 === e && (e = {});
			let n = e,
				r = n.progress,
				i = n.downloadTaskId,
				o = n.totalBytesExpectedToWrite,
				a = n.totalBytesWritten;
			i &&
				!isNaN(r) &&
				(Number(r) < (null != (t = Dr.progressCacheMap.get(i)) ? t : 0) ||
					(Dr.progressCacheMap.set(i, Number(r)),
						Dr.eventNexus.emit(i, { progress: r, totalBytesWritten: a, totalBytesExpectedToWrite: o })));
		});
	let Rr = "waiting",
		jr = "sending",
		Br = "done",
		Vr = "aborted",
		Wr = "created",
		zr = "in_queue",
		qr = 0,
		Ur = 0;
	function Jr() {
		let e = Zr.get(this);
		Yr.set(this, jr), ri.set(this, Date.now());
		let t,
			n = this,
			r = new Date().valueOf() % 1e6;
		Ur === r ? qr++ : ((Ur = r), (qr = 0));
		let i = +("" + r + (qr < 10 ? "0" + qr : qr));
		qr >= 99 && (qr = 0),
			Qr.set(n, i || r),
			jn("createDownloadTask", {
				url: e.url,
				header: e.header,
				data: e.data,
				method: e.method,
				filePath: e.filePath,
				taskId: i,
				success: function (e) {
					Xr.set(n, e.trace), Qr.set(n, e.downloadTaskId), (oi += 1), (si[e.downloadTaskId] = n);
				},
				fail: function (e) {
					Xr.set(n, e.trace), (t = e.errMsg), ui(n, "fail", t);
				},
				complete: function () {
					Yr.set(n, Br);
				}
			}),
			t
				? setTimeout(function () {
					let n = { errMsg: t.replace("createDownloadTask", "downloadFile") };
					"function" == typeof e.fail && e.fail(n), "function" == typeof e.complete && e.complete(n);
				}, 0)
				: (R.log("taskID", this, Qr.get(this)),
					ci.on(Qr.get(this) + "success", function (t) {
						(t.errMsg = "downloadFile:ok"),
							(t.statusCode = parseInt(t.statusCode, 10)),
							-1 === [200, 304].indexOf(t.statusCode) && delete t.tempPath,
							delete t.timeInterval,
							"function" == typeof e.success && e.success(t),
							"function" == typeof e.complete && e.complete(t);
					}),
					ci.on(Qr.get(this) + "fail", function (t) {
						(t.errMsg = "downloadFile:fail " + t.errMsg),
							"function" == typeof e.fail && e.fail(t),
							"function" == typeof e.complete && e.complete(t);
					}));
	}
	var Hr = 0,
		Kr = new WeakMap(),
		Gr = new WeakMap(),
		Qr = new WeakMap(),
		Yr = new WeakMap(),
		Zr = new WeakMap(),
		$r = new WeakMap(),
		Xr = new WeakMap(),
		ei = new WeakMap(),
		ti = new WeakMap(),
		ni = new WeakMap(),
		ri = new WeakMap(),
		ii = new WeakMap(),
		oi = 0,
		ai = [],
		si = {},
		ci = new Nr.EventEmitter2();
	function ui(e, t, n) {
		let r = ii.get(e),
			i = Yr.get(e) === Vr,
			o = i ? We : Ve,
			a = i ? "cancel" : t,
			s = Zr.get(e),
			c = $r.get(e),
			u = Date.now() - c,
			l = {
				request_version: "v1",
				request_trace: Xr.get(e) || "",
				request_url: s.url.split("?")[0],
				request_method: s.method || "GET",
				request_biz_invoke_time: $r.get(e),
				request_push_queue_time: ei.get(e) || 0,
				request_shift_queue_time: ni.get(e) || 0,
				request_queue_length: ti.get(e) || 0,
				request_abort_type: r || "",
				error_msg: n || "",
				duration: u,
				result_type: a,
				api_name: "downloadFile"
			};
		He(Pe, o).setPlatform("TeaSlardar").addMap(l).flush();
	}
	Bn("onDownloadTaskStateChange", function (e) {
		void 0 === e && (e = {}), "string" == typeof e && (e = JSON.parse(e));
		let t = e.state,
			n = e.downloadTaskId;
		if ((delete e.state, delete e.downloadTaskId, ci.emit("" + n + t, e), "success" === t || "fail" === t)) {
			if (((oi = Math.max(oi - 1, 0)), ai.length > 0)) {
				let r = ai.shift();
				ni.set(r.item, Date.now()), Jr.call(r.item);
			}
			let i = si[n];
			if (i) {
				try {
					ui(i, t, e.errMsg);
				} catch (e) { }
				delete si[n],
					ci.removeAllListeners(n + "success"),
					ci.removeAllListeners(n + "fail"),
					ci.removeAllListeners(n + "progressUpdate");
			}
		}
	});
	let li = l(function (e) {
		let t = this;
		(this.requestVersion = "v1"),
			(this.abort = function () {
				let e = Yr.get(t),
					n = Zr.get(t);
				if ((Yr.set(t, Vr), e === Rr)) {
					let r = ai.findIndex(function (e) {
						return e.id === Kr.get(t);
					});
					r > -1 && ai.splice(r, 1),
						ii.set(t, zr),
						setTimeout(function () {
							let e = "downloadFile:fail abort";
							"function" == typeof n.fail && n.fail({ errMsg: e }),
								ui(t, "cancel", e),
								"function" == typeof n.complete && n.complete({ errMsg: e });
						}, 0);
				} else e !== Vr && (ii.set(t, Wr), jn("operateDownloadTask", { downloadTaskId: Qr.get(t), operationType: "abort" }));
			}),
			(this.onProgressUpdate = function (e) {
				ci.on(Qr.get(t) + "progressUpdate", function (t) {
					"function" == typeof e && _t(e, "at DownloadTask.onProgressUpdate callback function")(t);
				});
			}),
			$r.set(this, Date.now());
		let n,
			r,
			i,
			o = Hr++;
		Gr.set(this, o),
			Kr.set(this, o),
			Yr.set(this, Rr),
			["success", "fail", "complete"].forEach(function (t) {
				let n = e[t];
				"function" == typeof n && (e[t] = _t(n, "at api downloadFile " + t + " callback function"));
			}),
			Zr.set(this, e),
			oi >= 5
				? (ei.set(this, Date.now()),
					ti.set(this, ai.length),
					ai.push({ id: o, item: this }),
					(n = this),
					(r = Zr.get(n)),
					(i = {
						request_trace: Xr.get(n) || "",
						request_url: r.url.split("?")[0],
						request_method: r.method || "GET",
						request_queue_length: 5 + ai.length,
						request_type: "downloadFile"
					}),
					He(Pe, ze).setPlatform("TeaSlardar").addMap(i).flush())
				: Jr.call(this);
	});
	function fi(e, t, n) {
		let r = Be,
			i = {
				request_url: "string" == typeof e ? e.split("?")[0] : q(e),
				request_method: "string" == typeof t ? t : q(t),
				error_msg: n,
				result_type: "fail",
				request_version: "v1",
				api_name: "downloadFile"
			};
		He(Pe, r).setPlatform("TeaSlardar").addMap(i).flush();
	}
	let di = On(
		null,
		function (e, t) {
			return {
				F: (function (t) {
					function n() {
						for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
						return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
					}
					return _(n, t), l(n);
				})(t),
				d: [
					{
						kind: "method",
						decorators: [$n()],
						key: "downloadFile",
						value: function (e) {
							if ((void 0 === e && (e = {}), this.beforeInvoke("downloadFile", e, { url: "" }))) {
								let t,
									n = "string" == typeof e.url ? e.url.split("?")[0] : q(e.url),
									r = "string" == typeof e.method ? e.method.toUpperCase() : e.method,
									i = {};
								(function (e, t) {
									return (
										void 0 === t && (t = "http"),
										"http" === t ? /^(http|https):\/\/.*/i.test(e) : "websocket" === t ? /^(ws|wss):\/\/.*/i.test(e) : void 0
									);
								})(e.url) || ((t = "uncertain"), (i.url = n)),
									(r && "GET" !== r) || !e.data || ((t = "uncertain"), (i.data = "method is GET")),
									"string" != typeof r ||
									("" !== r && !["HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"].includes(r.toUpperCase())) ||
									((t = "certain"), (i.method = e.method)),
									t &&
									He(Le, qe)
										.setPlatform("TeaSlardar")
										.addMap({ url: n, bk_type: t, api_name: "downloadFile", params: i })
										.flush();
								try {
									return new li(e);
								} catch (t) {
									fi(e.url, e.method, "downloadFile:fail create downloadFile instant catch error "),
										this.beforeInvokeFail("downloadFile", e, t.message);
								}
							} else fi(e.url, e.method, "downloadFile:fail invalid param.url type");
						}
					}
				]
			};
		},
		Xn
	);
	function hi(e) {
		let t = this;
		this.beforeInvoke("getImageInfo", e, { src: "" }, !0) &&
			(/^(http|https):\/\//.test(e.src)
				? this.downloadFileAPI.downloadFile({
					url: e.src,
					success: function (n) {
						(e.src = n.tempFilePath),
							t.invokeMethod("getImageInfo", e, {
								beforeSuccess: function (t) {
									t.path = e.src;
								}
							});
					},
					fail: function (n) {
						let r = { errno: pt, errString: lt() };
						t.beforeInvokeFail("getImageInfo", e, "download image fail", r);
					}
				})
				: (/^(tt)?file:\/\//.test(e.src) || (e.src = this.getRealRoute(e.src)),
					this.invokeMethod("getImageInfo", e, {
						beforeSuccess: function (t) {
							t.path = e.src;
						}
					})));
	}
	let pi = On(
		null,
		function (e, t) {
			let n;
			return {
				F: (function (t) {
					function n() {
						for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
						return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
					}
					return _(n, t), l(n);
				})(t),
				d: [
					{
						kind: "field",
						decorators: [
							((n = function () {
								return di;
							}),
								function (e, t) {
									let r = e.key;
									e.finisher = function (e) {
										e.injectDep(r, n);
									};
								})
						],
						key: "downloadFileAPI",
						value: void 0
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "chooseImage",
						value: function () {
							return this.createInvokeMethodApi("chooseImage", {
								defaults: { count: 9, sizeType: ["original", "compressed"], sourceType: ["album", "camera"] },
								beforeSuccess: function (e) {
									e.tempFileSizes &&
										(e.tempFiles = e.tempFilePaths.map(function (t, n) {
											return { path: t, size: e.tempFileSizes[n] };
										})),
										delete e.tempFileSizes;
								}
							});
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "previewImage",
						value: function () {
							return this.createInvokeMethodApi("previewImage");
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "getImageInfo",
						value: function () {
							return hi.bind(this);
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "saveImageToPhotosAlbum",
						value: function () {
							return this.createInvokeMethodApi("saveImageToPhotosAlbum");
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "compressImage",
						value: function () {
							let e = this;
							return this.createInvokeMethodApi("compressImage", {
								addStandardError: !0,
								checkParams: { src: "" },
								paramsTransformer: function (t) {
									return /^(tt)?file:\/\//.test(t.src) || /^(http|https):\/\//.test(t.src)
										? t
										: Object.assign({}, t, { src: e.getRealRoute(t.src) });
								}
							});
						}
					},
					{
						kind: "method",
						key: "getRealRoute",
						value: function (e) {
							return e;
						}
					}
				]
			};
		},
		Xn
	),
		vi = ["success", "loading", "none", "info", "error", "warning"],
		gi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "showToast",
							value: function (e) {
								void 0 === e && (e = {}),
									(e = Object.assign({ duration: 1500, title: "", icon: "success" }, e)).icon && -1 !== vi.indexOf(e.icon)
										? "none" === e.icon && (e.icon = "")
										: (e.icon = "success"),
									this.beforeInvoke("showToast", e, { duration: 1, title: "String", icon: "String" }, !0) &&
									this.invokeMethod("showToast", e);
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "hideToast",
							value: function () {
								return this.createInvokeMethodApi("hideToast");
							}
						}
					]
				};
			},
			Xn
		),
		mi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "showActionSheet",
							value: function (e) {
								void 0 === e && (e = {});
								this.beforeInvoke("showActionSheet", e, { itemList: ["String"] }) &&
									(e.itemList.length < 1 &&
										this.beforeInvokeFail("showActionSheet", e, "param.itemList should has at least 1 item"),
										e.itemList.length > 6
											? this.beforeInvokeFail("showActionSheet", e, "param.itemList should has at most 6 items")
											: this.invokeMethod("showActionSheet", e));
							}
						}
					]
				};
			},
			Xn
		),
		yi = function (e) {
			return "string" == typeof e ? e.replace(/[^\u0000-\u00ff]/g, "aa").length : 0;
		},
		ki = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "showPrompt",
							value: function () {
								let e = this;
								return function (t) {
									void 0 === t && (t = {}),
										yi(t.title) > 30
											? e.beforeInvokeFail("showPrompt", t, "title length should not larger than 15 Chinese characters")
											: yi(t.confirmText) > 8
												? e.beforeInvokeFail("showPrompt", t, "confirmText length should not larger than 4 Chinese characters")
												: yi(t.cancelText) > 8
													? e.beforeInvokeFail("showPrompt", t, "cancelText length should not larger than 4 Chinese characters")
													: ((t.maxLength = (function (e) {
														return "number" != typeof e || isNaN(e) ? 140 : e >= -1 ? e : 140;
													})(t.maxLength)),
														e.invokeMethod("showPrompt", t));
								};
							}
						}
					]
				};
			},
			Xn
		),
		wi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "setAuthenticationInfo",
							value: function () {
								return this.createInvokeMethodApi("setAuthenticationInfo", {
									checkParams: { mobile: "String", identifyCode: "String", identifyName: "String" }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startFaceIdentify",
							value: function () {
								return this.createInvokeMethodApi("startFaceIdentify");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startFaceVerify",
							value: function () {
								return this.createInvokeMethodApi("startFaceVerify", { checkParams: { userId: "String" }, addStandardError: !0 });
							}
						}
					]
				};
			},
			Xn
		),
		bi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getClipboardData",
							value: function () {
								return this.createInvokeMethodApi("getClipboardData");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "setClipboardData",
							value: function () {
								return this.createInvokeMethodApi("setClipboardData", { addStandardError: !0, checkParams: { data: "String" } });
							}
						}
					]
				};
			},
			Xn
		),
		_i = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							key: "enabled",
							value: function () {
								return !1;
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "startCompass",
							value: function (e) {
								void 0 === e && (e = {}), this.invokeMethod("startCompass", e), (this.enabled = !0);
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "stopCompass",
							value: function (e) {
								void 0 === e && (e = {}), this.invokeMethod("stopCompass", e), (this.enabled = !1);
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "CompassChange",
							value: function () {
								let e = this;
								return this.createNativeEventApi("onCompassChange", {
									whenListenerAdd: function () {
										e.enabled || e.startCompass();
									}
								});
							}
						}
					]
				};
			},
			Xn
		),
		Si = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							key: "enabled",
							value: function () {
								return !1;
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "startAccelerometer",
							value: function (e) {
								void 0 === e && (e = {}),
									this.invokeMethod("enableAccelerometer", Object.assign({}, e, { enable: !0 }), {
										beforeAll: function (e) {
											e.errMsg = e.errMsg.replace("enableAccelerometer", "startAccelerometer");
										}
									}),
									(this.enabled = !0);
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "stopAccelerometer",
							value: function (e) {
								void 0 === e && (e = {}),
									this.invokeMethod("enableAccelerometer", Object.assign({}, e, { enable: !1 }), {
										beforeAll: function (e) {
											e.errMsg = e.errMsg.replace("enableAccelerometer", "stopAccelerometer");
										}
									}),
									(this.enabled = !0);
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "AccelerometerChange",
							value: function () {
								let e = this;
								return this.createNativeEventApi("onAccelerometerChange", {
									whenListenerAdd: function () {
										e.enabled || e.startAccelerometer();
									}
								});
							}
						}
					]
				};
			},
			Xn
		);
	function Ci(e) {
		return (
			(e.devices || []).forEach(function (e) {
				let t = e.advertisData;
				t ? (e.advertisData = z(t)) : delete e.advertisData;
				let n = e.serviceData,
					r = void 0 === n ? {} : n;
				for (let i in r)
					if (r.hasOwnProperty(i)) {
						let o = r[i];
						o ? (r[i] = z(o)) : delete r[i];
					}
			}),
			e
		);
	}
	let Ai = new WeakMap(),
		Mi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "openBluetoothAdapter",
							value: function () {
								return this.createInvokeMethodApi("openBluetoothAdapter");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "closeBluetoothAdapter",
							value: function () {
								return this.createInvokeMethodApi("closeBluetoothAdapter");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getBluetoothAdapterState",
							value: function () {
								return this.createInvokeMethodApi("getBluetoothAdapterState");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startBluetoothDevicesDiscovery",
							value: function () {
								return this.createInvokeMethodApi("startBluetoothDevicesDiscovery", {
									addStandardError: !0,
									checkExtendParams: {
										services: { type: "Array", required: !1 },
										allowDuplicatesKey: { type: "Boolean", required: !1 },
										interval: { type: "Number", required: !1 }
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "stopBluetoothDevicesDiscovery",
							value: function () {
								return this.createInvokeMethodApi("stopBluetoothDevicesDiscovery");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getConnectedBluetoothDevices",
							value: function () {
								return this.createInvokeMethodApi("getConnectedBluetoothDevices", {
									addStandardError: !0,
									checkExtendParams: { services: { type: "Array", required: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getBluetoothDevices",
							value: function () {
								return this.createInvokeMethodApi("getBluetoothDevices", {
									paramsTransformer: function (e) {
										let t = e.success;
										return (
											t &&
											(e.success = function (e) {
												let n = Ci(e);
												t(n);
											}),
											e
										);
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BluetoothAdapterStateChange",
							value: function () {
								return this.createNativeEventApi("bluetoothAdapterStateChange");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BluetoothDeviceFound",
							value: function () {
								return this.createNativeEventApi("bluetoothDeviceFound", {
									wrapper: function (e) {
										return function (t) {
											let n = Ai.get(t) || Ci(t);
											Ai.set(t, n), e(n);
										};
									}
								});
							}
						}
					]
				};
			},
			Xn
		),
		Ei = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "connectBLEDevice",
							value: function () {
								return this.createInvokeMethodApi("connectBLEDevice", {
									addStandardError: !0,
									checkExtendParams: { deviceId: { type: "String", required: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "disconnectBLEDevice",
							value: function () {
								return this.createInvokeMethodApi("disconnectBLEDevice", {
									addStandardError: !0,
									checkExtendParams: { deviceId: { type: "String", required: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getBLEDeviceCharacteristics",
							value: function () {
								return this.createInvokeMethodApi("getBLEDeviceCharacteristics", {
									addStandardError: !0,
									checkExtendParams: { deviceId: { type: "String", required: !0 }, serviceId: { type: "String", required: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getBLEDeviceServices",
							value: function () {
								return this.createInvokeMethodApi("getBLEDeviceServices", {
									addStandardError: !0,
									checkExtendParams: { deviceId: { type: "String", required: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "notifyBLECharacteristicValueChange",
							value: function () {
								return this.createInvokeMethodApi("notifyBLECharacteristicValueChange", {
									addStandardError: !0,
									checkExtendParams: {
										deviceId: { type: "String", required: !0 },
										serviceId: { type: "String", required: !0 },
										characteristicId: { type: "String", required: !0 },
										descriptorId: { type: "String", required: !1 },
										state: { type: "Boolean", required: !1 }
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "readBLECharacteristicValue",
							value: function () {
								return this.createInvokeMethodApi("readBLECharacteristicValue", {
									addStandardError: !0,
									checkExtendParams: {
										deviceId: { type: "String", required: !0 },
										serviceId: { type: "String", required: !0 },
										characteristicId: { type: "String", required: !0 }
									}
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "writeBLECharacteristicValue",
							value: function () {
								return this.createInvokeMethodApi("writeBLECharacteristicValue", {
									addStandardError: !0,
									checkExtendParams: {
										deviceId: { type: "String", required: !0 },
										serviceId: { type: "String", required: !0 },
										characteristicId: { type: "String", required: !0 },
										value: { type: "String", required: !0 }
									}
								});
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "setBLEMTU",
							value: function (e) {
								void 0 === e && (e = {}),
									"ios" !== mt() ? this._setBLEMTU(e) : this.beforeInvokeFail("setBLEMTU", e, "iOS does not support");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BLECharacteristicValueChange",
							value: function () {
								return this.createNativeEventApi("BLECharacteristicValueChange");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BLEConnectionStateChange",
							value: function () {
								return this.createNativeEventApi("BLEConnectionStateChange");
							}
						},
						{
							kind: "field",
							key: "_setBLEMTU",
							value: function () {
								return this.createInvokeMethodApi("setBLEMTU", {
									addStandardError: !0,
									checkExtendParams: { deviceId: { type: "String", required: !0 }, mtu: { type: "Number", required: !0 } }
								});
							}
						}
					]
				};
			},
			Xn
		),
		Ii = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "reverseGeocode",
							value: function () {
								return this.createInvokeMethodApi("reverseGeocode");
							}
						}
					]
				};
			},
			Xn
		),
		Ti = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getKAInfo",
							value: function () {
								return this.createInvokeMethodApi("getKAInfo");
							}
						}
					]
				};
			},
			Xn
		),
		xi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getEnvVariable",
							value: function () {
								return this.createInvokeMethodApi("getEnvVariable");
							}
						}
					]
				};
			},
			Xn
		),
		Pi = "onChatBadgeChange",
		Li = "offChatBadgeChange",
		Fi = "getChatInfo",
		Oi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "method",
							decorators: [$n()],
							key: "onChatBadgeChange",
							value: function (e) {
								if (this.beforeInvoke(Pi, e, { openChatId: "", onChange: function () { } }, !0)) {
									let t = this.emitter,
										n = e.openChatId,
										r = e.onChange;
									t.size(n, r) || (t.size(n) || this.invokeMethod(Pi, e), t.on(n, r)), kt(Pi, e);
								}
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "offChatBadgeChange",
							value: function (e) {
								if (this.beforeInvoke(Li, e, { openChatId: "" }, !0)) {
									let t = e.openChatId,
										n = e.onChange,
										r = this.emitter,
										i = r.size(t, n);
									r.off(t, n), i && !r.size(t) && this.invokeMethod(Li, e), kt(Li, e);
								}
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "getChatInfo",
							value: function (e) {
								if (((null == void 0 ? void 0 : undefined.agent) || {}).isGetChatInfoStandardizeEnabled)
									this.beforeInvoke(Fi, e, { openChatId: "" }, !0) && this.invokeMethod(Fi, e);
								else if (this.beforeInvoke(Fi, e, { openChatId: "", chatType: 0 })) {
									let t = e.chatType;
									[0, 1].includes(t)
										? 0 !== t || [0, 1].includes(e.userType)
											? this.invokeMethod(Fi, e)
											: yt(Fi, e, "must set userType when chatType is 0")
										: this.beforeInvokeFail(Fi, e, "chatType can only be 0 or 1");
								}
							}
						},
						{
							kind: "method",
							key: "setup",
							value: function () {
								let e = this;
								this.onMethod("chatBadgeChangeObserved", function (t) {
									void 0 === t && (t = {}), t.openChatId && e.emitter.emit(t.openChatId, { badge: t.badge });
								});
							}
						}
					]
				};
			},
			Xn
		),
		Ni = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getLocation",
							value: function () {
								return this.createInvokeMethodApi("getLocation", {
									frequencyStrategy: "throttle",
									frequencyTime: 0,
									frequencyReportTimeout: 1e4,
									frequencyReporter: this.reportGetLocationTimeout.bind(this)
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "openLocation",
							value: function () {
								return this.createInvokeMethodApi("openLocation", { checkParams: { latitude: 0, longitude: 0 } });
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "chooseLocation",
							value: function () {
								return this.createInvokeMethodApi("chooseLocation");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getLocationStatus",
							value: function () {
								return this.createInvokeMethodApi("getLocationStatus");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startLocationUpdate",
							value: function () {
								return this.createInvokeMethodApi("startLocationUpdate");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "stopLocationUpdate",
							value: function () {
								return this.createInvokeMethodApi("stopLocationUpdate");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "LocationChange",
							value: function () {
								return this.createNativeEventApi("onLocationChange");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "LocationChangeError",
							value: function () {
								return this.createNativeEventApi("onLocationChangeError");
							}
						},
						{
							kind: "method",
							key: "reportGetLocationTimeout",
							value: function (e) {
								let t = e.timeout,
									n = e.apiName,
									r = e.waitingLength;
								He(xe, Re).addMap({ api_name: n, api_queue_length: r, api_timeout: t }).flush();
							}
						}
					]
				};
			},
			Xn
		),
		Di = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "shareWebContent",
							value: function () {
								return this.createInvokeMethodApi("shareWebContent");
							}
						}
					]
				};
			},
			Xn
		),
		Ri = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "share",
							value: function () {
								return this.createInvokeMethodApi("share");
							}
						}
					]
				};
			},
			Xn
		),
		ji = (function () {
			function e() { }
			return (
				(e.createInstance = function (t) {
					let n = this,
						r = new e(),
						i = Mt();
					this.taskIDMap.set(r, i);
					let o = Object.assign({}, t, { taskID: i });
					return (
						Qn(this.apiName, {
							beforeAll: function () {
								n.finishMap.set(r, !0);
							}
						})(o),
						r
					);
				}),
				(e.onProgressUpdate = function (e, t) {
					let n = this,
						r = this.taskIDMap.get(e);
					r &&
						!e.finish &&
						Wi.on(r, function (e) {
							"function" == typeof t && _t(t, "at " + n.apiName + ".onProgressUpdate callback function")(e);
						});
				}),
				(e.abortWith = function (e, t) {
					let n = this,
						r = this.taskIDMap.get(e);
					if (r && !e.finish) {
						Qn(this.abortName, {
							afterSuccess: function () {
								n.finishMap.set(e, !0);
							}
						})(Object.assign({ taskID: r }, t));
					} else {
						yt(this.apiName + ".abort", t, void 0, { errString: "Task completed", errno: 2500004 });
					}
				}),
				(e.isFinishWith = function (e) {
					return !!this.finishMap.get(e);
				}),
				l(e, [
					{
						key: "finish",
						get: function () {
							return !1;
						}
					}
				]),
				e
			);
		})();
	(ji.apiName = void 0), (ji.abortName = void 0), (ji.taskIDMap = void 0), (ji.finishMap = void 0);
	let Bi = (function (e) {
		function t() {
			for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
			return (
				((n = e.call.apply(e, [this].concat(i)) || this).onProgressUpdate = function (e) {
					return t.onProgressUpdate($(n), e);
				}),
				(n.abort = function (e) {
					return t.abortWith($(n), e);
				}),
				n
			);
		}
		return (
			_(t, e),
			l(t, [
				{
					key: "finish",
					get: function () {
						return t.isFinishWith(this);
					}
				}
			]),
			t
		);
	})(ji);
	(Bi.apiName = "uploadFileToCloud"),
		(Bi.abortName = "uploadFileToCloudAbort"),
		(Bi.taskIDMap = new WeakMap()),
		(Bi.finishMap = new WeakMap());
	let Vi = (function (e) {
		function t() {
			for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
			return (
				((n = e.call.apply(e, [this].concat(i)) || this).onProgressUpdate = function (e) {
					return t.onProgressUpdate($(n), e);
				}),
				(n.abort = function (e) {
					return t.abortWith($(n), e);
				}),
				n
			);
		}
		return (
			_(t, e),
			l(t, [
				{
					key: "finish",
					get: function () {
						return t.isFinishWith(this);
					}
				}
			]),
			t
		);
	})(ji);
	(Vi.apiName = "downloadFileFromCloud"),
		(Vi.abortName = "downloadFileFromCloudAbort"),
		(Vi.taskIDMap = new WeakMap()),
		(Vi.finishMap = new WeakMap());
	var Wi = new Nr.EventEmitter2(),
		zi = new Map();
	["onUploadFileToCloudUpdate", "onDownloadFileFromCloudUpdate"].forEach(function (e) {
		Bn(e, function (e) {
			let t = e.taskID,
				n = e.progress;
			if (
				t &&
				n &&
				(function (e) {
					return "Number" === it(e);
				})(n)
			) {
				let r = zi.get(t);
				if ((r || 0 === r) && n < r) return;
				zi.set(t, n), Wi.emit(t, { progress: n });
			}
		});
	});
	let qi = On(
		null,
		function (e, t) {
			return {
				F: (function (t) {
					function n() {
						for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
						return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
					}
					return _(n, t), l(n);
				})(t),
				d: [
					{
						kind: "field",
						decorators: [$n()],
						key: "uploadFileToCloud",
						value: function () {
							return function (e) {
								return Bi.createInstance(e);
							};
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "downloadFileFromCloud",
						value: function () {
							return function (e) {
								return Vi.createInstance(e);
							};
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "openFileFromCloud",
						value: function () {
							return this.createInvokeMethodApi("openFileFromCloud");
						}
					}
				]
			};
		},
		Xn
	),
		Ui = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "UserCaptureScreen",
							value: function () {
								let e = this;
								return this.createNativeEventApi("userCaptureScreenObserved", {
									whenListenerExisted: function () {
										e.invokeMethod("onUserCaptureScreen");
									},
									whenListenerEmptied: function () {
										e.invokeMethod("offUserCaptureScreen");
									}
								});
							}
						}
					]
				};
			},
			Xn
		),
		Ji = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getNetworkType",
							value: function () {
								return this.createInvokeMethodApi("getNetworkType");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "NetworkStatusChange",
							value: function () {
								return null;
							}
						}
					]
				};
			},
			Xn
		),
		Hi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getNetworkQualityType",
							value: function () {
								return this.createInvokeMethodApi("getNetworkQualityType");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "NetworkQualityChange",
							value: function () {
								let e = this;
								return this.createNativeEventApi("onNetworkQualityChange", {
									whenListenerExisted: function () {
										e.invokeMethod("onNetworkQualityChange");
									},
									whenListenerEmptied: function () {
										e.invokeMethod("offNetworkQualityChange");
									}
								});
							}
						}
					]
				};
			},
			Xn
		),
		Ki = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getConnectedWifi",
							value: function () {
								return this.createInvokeMethodApi("getConnectedWifi");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getWifiStatus",
							value: function () {
								return this.createInvokeMethodApi("getWifiStatus");
							}
						},
						{
							kind: "field",
							decorators: [$n({ sync: !0 })],
							key: "getWifiStatusSync",
							value: function () {
								return null;
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getWifiList",
							value: function () {
								return this.createInvokeMethodApi("getWifiList");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "GetWifiList",
							value: function () {
								let e = this;
								return this.createNativeEventApi("onGetWifiList", {
									whenListenerExisted: function () {
										e.invokeMethod("onGetWifiList");
									},
									whenListenerEmptied: function () {
										e.invokeMethod("offGetWifiList");
									}
								});
							}
						}
					]
				};
			},
			Xn
		),
		Gi = "_onWatermarkChange";
	function Qi(e) {
		let t, n, r;
		return (
			"function" == typeof e
				? (t = e)
				: "object" == typeof e &&
				("function" == typeof e.callback && (t = e.callback),
					"function" == typeof e.success && (n = e.success),
					"function" == typeof e.fail && (r = e.fail)),
			{ callback: t, success: n, fail: r }
		);
	}
	let Yi = On(
		null,
		function (e, t) {
			let n = (function (t) {
				function n() {
					for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
					return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
				}
				return _(n, t), l(n);
			})(t);
			return {
				F: n,
				d: [
					{
						kind: "field",
						decorators: [$n()],
						key: "checkWatermark",
						value: function () {
							return this.createInvokeMethodApi("checkWatermark");
						}
					},
					{
						kind: "field",
						decorators: [$n()],
						key: "hasWatermark",
						value: function () {
							return null;
						}
					},
					{
						kind: "method",
						decorators: [$n()],
						key: "onWatermarkChange",
						value: function (e) {
							if (e) {
								let t = Qi(e),
									n = t.callback,
									r = t.success,
									i = t.fail;
								if (n) {
									let o = this.emitter;
									if (0 === o.size(Gi)) {
										this.invokeMethod("onWatermarkChange", {
											success: function (e) {
												o.on(Gi, n), r && r(e);
											},
											fail: i
										});
									} else o.on(Gi, n), r && r();
								} else i && i("have no callback");
							}
						}
					},
					{
						kind: "method",
						decorators: [$n()],
						key: "offWatermarkChange",
						value: function (e) {
							if (e) {
								let t = Qi(e),
									n = t.callback,
									r = t.success,
									i = t.fail;
								if (n) {
									r && r();
									let o = this.emitter,
										a = o.size(Gi);
									o.off(Gi, n), 1 === a && 0 === o.size(Gi) && this.invokeMethod("offWatermarkChange", {});
								} else i && i("have no callback");
							}
						}
					},
					{
						kind: "method",
						key: "setup",
						value: function () {
							let e = this;
							cr(Ge(n.prototype), "setup", this).call(this),
								this.onMethod("onWatermarkChange", function (t) {
									void 0 === t && (t = {}), e.emitter.emit(Gi, t);
								});
						}
					}
				]
			};
		},
		Xn
	),
		Zi = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "checkLocalFaceVerify",
							value: function () {
								return this.createInvokeMethodApi("checkLocalFaceVerify", {
									addStandardError: !0,
									checkExtendParams: { checkUpdate: { type: "Boolean", required: !1, defaultValue: !0 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "prepareLocalFaceVerify",
							value: function () {
								return this.createInvokeMethodApi("prepareLocalFaceVerify", {
									addStandardError: !0,
									checkExtendParams: { timeout: { type: "Number", required: !1, defaultValue: 60 } }
								});
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startLocalFaceVerify",
							value: function () {
								return this.createInvokeMethodApi("startLocalFaceVerify", {
									addStandardError: !0,
									checkExtendParams: { path: { type: "String", required: !0 } }
								});
							}
						}
					]
				};
			},
			Xn
		),
		$i = ["ascii", "base64", "binary", "hex", "ucs2", "ucs-2", "utf16le", "utf-16le", "utf-8", "utf8", "latin1"];
	function Xi(e, t) {
		if (!e || "string" != typeof e) throw gt(new TypeError(t + " must be a string"), t);
	}
	let eo = (function () {
		function e(e) {
			let t = e.mode,
				n = void 0 === t ? 0 : t,
				r = e.size,
				i = void 0 === r ? 0 : r,
				o = e.lastAccessedTime,
				a = void 0 === o ? "" : o,
				s = e.lastModifiedTime,
				c = void 0 === s ? "" : s;
			(this.mode = void 0),
				(this.size = void 0),
				(this.lastAccessedTime = void 0),
				(this.lastModifiedTime = void 0),
				(this.mode = n),
				(this.size = i),
				(this.lastAccessedTime = a),
				(this.lastModifiedTime = c);
		}
		let t = e.prototype;
		return (
			(t._checkModeProperty = function (e) {
				return (61440 & this.mode) === e;
			}),
			(t.isFile = function () {
				return this._checkModeProperty(32768);
			}),
			(t.isDirectory = function () {
				return this._checkModeProperty(16384);
			}),
			l(e)
		);
	})();
	function to() {
		let e = this.createInvokeMethodApi,
			t = this.createInvokeMethodSyncApi;
		return {
			getFileInfo: e("getFileInfo", { addStandardError: !0, checkParams: { filePath: "" } }),
			getSavedFileList: e("getSavedFileList", { addStandardError: !0 }),
			removeSavedFile: e("removeSavedFile", { addStandardError: !0, checkParams: { filePath: "" } }),
			getSavedFileInfo: e("getSavedFileInfo", { addStandardError: !0, checkParams: { filePath: "" } }),
			saveFile: e("saveFile", { addStandardError: !0, checkParams: { tempFilePath: "" } }),
			saveFileSync: t(
				"saveFileSync",
				function (e, t) {
					return Xi(e, "tempFilePath"), { tempFilePath: e, filePath: t };
				},
				function (e) {
					return e.savedFilePath;
				}
			),
			readFile: e("readFile", { addStandardError: !0, checkParams: { filePath: "" } }),
			readFileSync: t(
				"readFileSync",
				function (e, t) {
					Xi(e, "filePath");
					let n = { filePath: e };
					return t && (Xi(t, "encoding"), (n.encoding = t)), n;
				},
				function (e) {
					return e.data;
				}
			),
			writeFile: e("writeFile", {
				addStandardError: !0,
				checkParams: { filePath: "" },
				customCheckParams: function (e) {
					if (e.encoding && !$i.includes(e.encoding))
						return { message: 'invalid encoding "' + e.encoding + '"', key: "encoding" };
				}
			}),
			writeFileSync: t(
				"writeFileSync",
				function (e, t, n) {
					if ((Xi(e, "filePath"), n && -1 === $i.indexOf(n))) throw vt(new Error('invalid encoding "' + n + '"'), "encoding");
					return { filePath: e, data: t, encoding: n };
				},
				!1
			),
			mkdir: e("mkdir", { addStandardError: !0, checkParams: { dirPath: "" } }),
			mkdirSync: t(
				"mkdirSync",
				function (e, t) {
					return void 0 === t && (t = !1), Xi(e, "dirPath"), { dirPath: e, recursive: t };
				},
				!1
			),
			readdir: e("readdir", { addStandardError: !0, checkParams: { dirPath: "" } }),
			readdirSync: t(
				"readdirSync",
				function (e) {
					return Xi(e, "dirPath"), { dirPath: e };
				},
				function (e) {
					return e.files;
				}
			),
			rmdir: e("rmdir", { addStandardError: !0, checkParams: { dirPath: "" } }),
			rmdirSync: t(
				"rmdirSync",
				function (e, t) {
					return void 0 === t && (t = !1), Xi(e, "dirPath"), { dirPath: e, recursive: t };
				},
				!1
			),
			access: e("access", {
				addStandardError: !0,
				checkParams: { path: "" },
				paramsTransformer: function (e) {
					/^(ttfile|http):\/\/(user|temp)$/.test(e.path) && (e.path += "/");
				}
			}),
			accessSync: t(
				"accessSync",
				function (e) {
					Xi(e, "path");
					return /^(ttfile|http):\/\/(user|temp)$/.test(e) && (e += "/"), { path: e };
				},
				!1
			),
			unlink: e("unlink", { addStandardError: !0, checkParams: { filePath: "" } }),
			unlinkSync: t(
				"unlinkSync",
				function (e) {
					return Xi(e, "filePath"), { filePath: e };
				},
				!1
			),
			stat: e("stat", {
				addStandardError: !0,
				checkParams: { path: "" },
				beforeSuccess: function (e) {
					e.stats = e.stat = new eo(e.stat);
				}
			}),
			statSync: t(
				"statSync",
				function (e) {
					return Xi(e, "path"), { path: e };
				},
				function (e) {
					return new eo(e.stat);
				}
			),
			rename: e("rename", { addStandardError: !0, checkParams: { oldPath: "", newPath: "" } }),
			renameSync: t(
				"renameSync",
				function (e, t) {
					return Xi(e, "oldPath"), Xi(t, "newPath"), { oldPath: e, newPath: t };
				},
				!1
			),
			copyFile: e("copyFile", { addStandardError: !0, checkParams: { srcPath: "", destPath: "" } }),
			copyFileSync: t(
				"copyFileSync",
				function (e, t) {
					return Xi(e, "srcPath"), Xi(t, "destPath"), { srcPath: e, destPath: t };
				},
				!1
			),
			unzip: e("unzip", { addStandardError: !0, checkParams: { zipFilePath: "", targetPath: "" } }),
			appendFile: e("appendFile", { addStandardError: !0 }),
			appendFileSync: t(
				"appendFileSync",
				function (e, t, n) {
					return { filePath: e, data: t, encoding: n };
				},
				!1,
				{ firstUseErrString: !0 }
			)
		};
	}
	let no,
		ro,
		io = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							key: "fs",
							value: function () {
								return to.call(this);
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "getFileSystemManager",
							value: function () {
								return this.fs;
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "saveFile",
							value: function () {
								return this.fs.saveFile;
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getFileInfo",
							value: function () {
								return null;
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getSavedFileList",
							value: function () {
								return this.fs.getSavedFileList;
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "removeSavedFile",
							value: function () {
								return this.fs.removeSavedFile;
							}
						}
					]
				};
			},
			Xn
		),
		oo = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getExtConfig",
							value: function () {
								return this.createInvokeMethodApi("getExtConfig");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getExtConfigSync",
							value: function () {
								return null;
							}
						}
					]
				};
			},
			Xn
		),
		ao = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "makePhoneCall",
							value: function () {
								return this.createInvokeMethodApi("makePhoneCall", { addStandardError: !0, checkParams: { phoneNumber: "" } });
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "getPhoneNumber",
							value: function () {
								return null;
							}
						}
					]
				};
			},
			Xn
		),
		so = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "scanCode",
							value: function () {
								return this.createInvokeMethodApi("scanCode", {
									addStandardError: !0,
									beforeSuccess: function (e) {
										"string" == typeof e.path &&
											((e.path = e.path.replace(/\.html$/, "")), (e.path = e.path.replace(/\.html\?/, "?")));
									}
								});
							}
						}
					]
				};
			},
			Xn
		);
	!(function (e) {
		(e.NDEF = "NDEF"),
			(e.A = "NFC-A"),
			(e.B = "NFC-B"),
			(e.F = "NFC-F"),
			(e.V = "NFC-V"),
			(e.MIFARE_CLASSIC = "MIFARE-Classic"),
			(e.MIFARE_ULTRALIGHT = "MIFARE-Ultralight"),
			(e.ISO_DEP = "ISO-DEP");
	})(ro || (ro = {}));
	let co = new WeakMap();
	function uo(e, t, n) {
		co.get(e).invokeMethod(t, Object.assign({ tech: e.tech }, n));
	}
	let lo = (function () {
		function e(e, t) {
			(this.tech = void 0),
				(this.tech = e),
				(function (e, t) {
					co.set(e, t);
				})(this, t);
		}
		let t = e.prototype;
		return (
			(t.connect = function (e) {
				uo(this, "nfcConnect", e);
			}),
			(t.close = function (e) {
				uo(this, "nfcClose", e);
			}),
			(t.setTimeout = function (e) {
				uo(this, "nfcSetTimeout", e);
			}),
			(t.transceive = function (e) {
				uo(this, "nfcTransceive", e);
			}),
			(t.getMaxTransceiveLength = function (e) {
				uo(this, "nfcMaxTransceiveLength", e);
			}),
			l(e)
		);
	})(),
		fo = (function (e) {
			function t(t) {
				return e.call(this, ro.A, t) || this;
			}
			_(t, e);
			let n = t.prototype;
			return (
				(n.getAtqa = function (e) {
					uo(this, "nfcGetAtqa", e);
				}),
				(n.getSak = function (e) {
					uo(this, "nfcGetSak", e);
				}),
				l(t)
			);
		})(lo),
		ho = (function (e) {
			function t(t) {
				return e.call(this, ro.V, t) || this;
			}
			return _(t, e), l(t);
		})(lo),
		po = (function (e) {
			function t(t) {
				return e.call(this, ro.MIFARE_CLASSIC, t) || this;
			}
			return _(t, e), l(t);
		})(lo),
		vo = (((no = {})[ro.A] = fo), (no[ro.V] = ho), (no[ro.MIFARE_CLASSIC] = po), no),
		go = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							key: "adapter",
							value: function () {
								return this.nfcAdapter();
							}
						},
						{
							kind: "field",
							key: "instances",
							value: function () {
								return {};
							}
						},
						{
							kind: "method",
							decorators: [$n()],
							key: "getNFCAdapter",
							value: function () {
								return this.adapter;
							}
						},
						{
							kind: "method",
							key: "nfcAdapter",
							value: function () {
								let e = this,
									t = this.createNativeEventApi("nfcFoundDevice"),
									n = t.on,
									r = t.off;
								return {
									tech: ro,
									getNfcA: function () {
										return e.getInstance(ro.A);
									},
									getNfcV: function () {
										return e.getInstance(ro.V);
									},
									getMifareClassic: function () {
										return e.getInstance(ro.MIFARE_CLASSIC);
									},
									onDiscovered: n,
									offDiscovered: r,
									startDiscovery: this.createInvokeMethodApi("nfcStartDiscovery"),
									stopDiscovery: this.createInvokeMethodApi("nfcStopDiscovery")
								};
							}
						},
						{
							kind: "method",
							key: "getInstance",
							value: function (e) {
								let t = this.instances;
								return t[e] || (t[e] = new vo[e](this)), t[e];
							}
						}
					]
				};
			},
			Xn
		),
		mo = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "startDeviceCredential",
							value: function () {
								return this.createInvokeMethodApi("startDeviceCredential", { checkParams: { authContent: "String" } });
							}
						}
					]
				};
			},
			Xn
		),
		yo = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getTriggerContext",
							value: function () {
								return this.createInvokeMethodApi("getTriggerContext");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "sendMessageCard",
							value: function () {
								return this.createInvokeMethodApi("sendMessageCard");
							}
						}
					]
				};
			},
			Xn
		),
		ko = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "mailto",
							value: function () {
								return this.createInvokeMethodApi("mailto");
							}
						}
					]
				};
			},
			Xn
		),
		wo = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getDeviceID",
							value: function () {
								return this.createInvokeMethodApi("getDeviceID");
							}
						}
					]
				};
			},
			Xn
		),
		bo = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "reportBadge",
							value: function () {
								return this.createInvokeMethodApi("reportBadge");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "updateBadge",
							value: function () {
								return this.createInvokeMethodApi("updateBadge");
							}
						}
					]
				};
			},
			Xn
		),
		_o = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "chooseMedia",
							value: function () {
								return this.createInvokeMethodApi("chooseMedia");
							}
						}
					]
				};
			},
			Xn
		),
		So = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getUserInfoEx",
							value: function () {
								return this.createInvokeMethodApi("getUserInfoEx");
							}
						}
					]
				};
			},
			Xn
		),
		Co = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getStepCount",
							value: function () {
								return this.createInvokeMethodApi("getStepCount");
							}
						}
					]
				};
			},
			Xn
		),
		Ao = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "getBeacons",
							value: function () {
								return this.createInvokeMethodApi("getBeacons");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "startBeaconDiscovery",
							value: function () {
								return this.createInvokeMethodApi("startBeaconDiscovery");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "stopBeaconDiscovery",
							value: function () {
								return this.createInvokeMethodApi("stopBeaconDiscovery");
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BeaconUpdate",
							value: function () {
								return this.createNativeEventApi("beaconUpdate", { offPolicy: "clearAll" });
							}
						},
						{
							kind: "field",
							decorators: [$n()],
							key: "BeaconServiceChange",
							value: function () {
								return this.createNativeEventApi("beaconServiceChange", { offPolicy: "clearAll" });
							}
						}
					]
				};
			},
			Xn
		);
	function Mo(e) {
		void 0 === e && (e = {}), jn("getBlockActionSourceDetail", e);
	}
	let Eo = Qn("vibrateShort"),
		Io = Qn("vibrateLong");
	function To(e) {
		void 0 === e && (e = {}),
			(e.sourceType = e.sourceType || ["album", "camera"]),
			(e.camera = e.camera || ["front", "back"]),
			"boolean" != typeof e.compressed && (e.compressed = !0),
			jn("chooseVideo", e);
	}
	function xo(e) {
		void 0 === e && (e = {}), jn("saveVideoToPhotosAlbum", e, {});
	}
	new ((function () {
		function e() { }
		let t = e.prototype;
		return (t.destroy = function () { }), (t.hide = function () { }), (t.show = function () { }), l(e);
	})())();
	let Po = Qn("getSetting"),
		Lo = Qn("openSetting");
	function Fo(e) {
		let t = e.value,
			n = e.success,
			r = e.fail;
		return new Promise(function (e, i) {
			jn(
				"setScreenBrightness",
				{ value: t },
				{
					afterSuccess: function (t) {
						e(n ? n(t) : t);
					},
					afterCancel: function (e) {
						i(r ? r(e) : e);
					},
					afterFail: function (e) {
						i(r ? r(e) : e);
					}
				}
			);
		});
	}
	function Oo(e) {
		let t = e.success,
			n = e.fail;
		return new Promise(function (e, r) {
			jn(
				"getScreenBrightness",
				{},
				{
					afterSuccess: function (n) {
						e(t ? t(n) : n);
					},
					afterCancel: function (e) {
						r(n ? n(e) : e);
					},
					afterFail: function (e) {
						r(n ? n(e) : e);
					}
				}
			);
		});
	}
	function No(e) {
		void 0 === e && (e = {}),
			void 0 === e.keepScreenOn && (e.keepScreenOn = !0),
			zn("setKeepScreenOn", e, { keepScreenOn: !0 }) && jn("setKeepScreenOn", e);
	}
	let Do = Qn("getTenantAppScopes"),
		Ro = Qn("applyTenantAppScope"),
		jo = new Nr(),
		Bo = {
			8e3: [16e3, 48e3],
			11025: [16e3, 48e3],
			12e3: [24e3, 64e3],
			16e3: [24e3, 96e3],
			22050: [32e3, 128e3],
			24e3: [32e3, 128e3],
			32e3: [48e3, 192e3],
			44100: [64e3, 32e4],
			48e3: [64e3, 32e4]
		},
		Vo = Object.keys(Bo).map(function (e) {
			return parseInt(e);
		});
	function Wo(e) {
		jn("operateRecorder", Object.assign({}, e));
	}
	Bn("onRecorderStateChange", function (e) {
		void 0 === e && (e = {});
		let t = e.state;
		delete e.state, jo.emit("onRecorderStateChange_" + t, e);
	});
	let zo = {
		start: function (e) {
			void 0 === e && (e = {});
			let t = Object.assign({ format: "aac", sampleRate: 8e3, encodeBitRate: 48e3, numberOfChannels: 2, duration: 6e4 }, e, {
				operationType: "start",
				fail: function (e) {
					jo.emit("onRecorderStateChange_error", e);
				}
			});
			if (-1 === Vo.indexOf(t.sampleRate))
				throw new Error(
					'invalid sampleRate "' + t.sampleRate + '", sampleRate should be one of ' + JSON.stringify(Object.keys(Bo))
				);
			if (t.encodeBitRate > Bo[t.sampleRate][1] || t.encodeBitRate < Bo[t.sampleRate][0])
				throw new Error(
					'invalid encodeBitRate "' +
					t.encodeBitRate +
					'", encodeBitRate should be greater than ' +
					Bo[t.sampleRate][0] +
					" and less than " +
					Bo[t.sampleRate][1]
				);
			(t.duration > 6e5 || t.duration < 0) && (t.duration = 6e4), Wo(t);
		},
		pause: function () {
			Wo({
				operationType: "pause",
				fail: function (e) {
					jo.emit("onRecorderStateChange_error", e);
				}
			});
		},
		resume: function () {
			Wo({
				operationType: "resume",
				fail: function (e) {
					jo.emit("onRecorderStateChange_error", e);
				}
			});
		},
		stop: function () {
			Wo({
				operationType: "stop",
				fail: function (e) {
					jo.emit("onRecorderStateChange_error", e);
				}
			});
		},
		onStart: function (e) {
			jo.removeAllListeners("onRecorderStateChange_start"),
				jo.on("onRecorderStateChange_start", function (t) {
					"function" == typeof e && _t(e, "at recorderManager.onStart callback function")(t);
				});
		},
		onResume: function (e) {
			jo.removeAllListeners("onRecorderStateChange_resume"),
				jo.on("onRecorderStateChange_resume", function (t) {
					"function" == typeof e && _t(e, "at recorderManager.onResume callback function")(t);
				});
		},
		onPause: function (e) {
			jo.removeAllListeners("onRecorderStateChange_pause"),
				jo.on("onRecorderStateChange_pause", function (t) {
					"function" == typeof e && _t(e, "at recorderManager.onPause callback function")(t);
				});
		},
		onStop: function (e) {
			jo.removeAllListeners("onRecorderStateChange_stop"),
				jo.on("onRecorderStateChange_stop", function (t) {
					"function" == typeof e && _t(e, "at recorderManager.onStop callback function")(t);
				});
		},
		onFrameRecorded: function (e) {
			jo.removeAllListeners("onRecorderStateChange_frameRecorded"),
				jo.on("onRecorderStateChange_frameRecorded", function (t) {
					if ("function" == typeof e) {
						let n = t.frameBuffer;
						"string" == typeof n && (t.frameBuffer = z(n)), _t(e, "at recorderManager.onFrameRecorded callback function")(t);
					}
				});
		},
		onError: function (e) {
			jo.removeAllListeners("onRecorderStateChange_error"),
				jo.on("onRecorderStateChange_error", function (t) {
					"function" == typeof e && _t(e, "at recorderManager.onError callback function")(t);
				});
		}
	};
	function qo() {
		return zo;
	}
	let Uo = Qn("requestAuthCode"),
		Jo = [
			ir,
			or,
			rr,
			ar,
			hr,
			pr,
			gi,
			mi,
			ki,
			vr,
			yr,
			wr,
			_r,
			Sr,
			Cr,
			Mr,
			Er,
			Ir,
			xr,
			Pr,
			Lr,
			Fr,
			Or,
			di,
			pi,
			wi,
			bi,
			_i,
			Si,
			Mi,
			Ei,
			Ii,
			Ti,
			xi,
			Oi,
			Ni,
			Di,
			Ri,
			qi,
			Ui,
			Ji,
			Hi,
			Ki,
			Yi,
			Zi,
			io,
			oo,
			ao,
			so,
			go,
			mo,
			yo,
			ko,
			wo,
			bo,
			_o,
			So,
			Co,
			Ao
		],
		Ho = Object.freeze({
			__proto__: null,
			apis: Jo,
			getBlockActionSourceDetail: Mo,
			vibrateLong: Io,
			vibrateShort: Eo,
			chooseVideo: To,
			saveVideoToPhotosAlbum: xo,
			getSetting: Po,
			openSetting: Lo,
			setKeepScreenOn: No,
			getTenantAppScopes: Do,
			applyTenantAppScope: Ro,
			getRecorderManager: qo,
			requestAuthCode: Uo,
			getScreenBrightness: Oo,
			setScreenBrightness: Fo
		}),
		Ko = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "print",
							value: function () {
								return this.createInvokeMethodApi("print", { checkParams: { url: "" } });
							}
						}
					]
				};
			},
			Xn
		),
		Go = On(
			null,
			function (e, t) {
				return {
					F: (function (t) {
						function n() {
							for (var n, r = arguments.length, i = new Array(r), o = 0; o < r; o++) i[o] = arguments[o];
							return (n = t.call.apply(t, [this].concat(i)) || this), e($(n)), n;
						}
						return _(n, t), l(n);
					})(t),
					d: [
						{
							kind: "field",
							decorators: [$n()],
							key: "notifyIPAddressChange",
							value: function () {
								return this.createInvokeMethodApi("notifyIPAddressChange");
							}
						}
					]
				};
			},
			Xn
		),
		Qo = [].concat(Jo, [mr, br, Ko, Ar, Go]),
		Yo = Object.freeze({
			__proto__: null,
			apis: Qo,
			getBlockActionSourceDetail: Mo,
			vibrateLong: Io,
			vibrateShort: Eo,
			chooseVideo: To,
			saveVideoToPhotosAlbum: xo,
			getSetting: Po,
			openSetting: Lo,
			setKeepScreenOn: No,
			getTenantAppScopes: Do,
			applyTenantAppScope: Ro,
			getRecorderManager: qo,
			requestAuthCode: Uo,
			getScreenBrightness: Oo,
			setScreenBrightness: Fo
		}),
		Zo = /(Android|iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) ? Ho : Yo,
		$o = {};
	for (var Xo in Zo)
		"apis" === Xo
			? (function () {
				let e = new nr(
					{
						appKey: "h5sdk",
						bridge: Un,
						useNewDownloadAPI: !1,
						getJSSDKVersion: function () {
							return "undefined" != typeof __JSSDK_VERSION__ ? __JSSDK_VERSION__ : {};
						}
					},
					Zo[Xo]
				);
				ve(e), Object.assign($o, e.exports);
				let t = [];
				Array.from(e.instance.values()).forEach(function (e) {
					null != e && e.composeSafariCache && t.push(e);
				}),
					window.addEventListener("pageshow", function (e) {
						let n = { persisted: e.persisted, navigationType: window.performance.navigation.type };
						t.forEach(function (e) {
							let t = null == e ? void 0 : e.composeSafariCache();
							Object.assign(n, t);
						}),
							jn("pageshow", n);
					}),
					document.addEventListener("visibilitychange", function (e) {
						let n = { visibilityState: document.visibilityState };
						t.forEach(function (e) {
							let t = null == e ? void 0 : e.composeSafariCache();
							Object.assign(n, t);
						}),
							jn("visibilitychange", n);
					});
			})()
			: ($o[Xo] = Zo[Xo]);
	let ea = function (e) {
		for (var t = !1, n = 0; n < e.length; n++) {
			let r = e[n];
			if ("META" === r.nodeName && r.hasAttribute("lk-config")) {
				t = !0;
				break;
			}
		}
		return t;
	};
	!(function () {
		let e = [],
			t = null,
			n = function () {
				sn.invoke("monitorReport", { monitorEvents: e }), (e = []), clearTimeout(t), (t = null);
			},
			r = new ke({
				report: function (r) {
					let i = r.name,
						o = r.metrics,
						a = void 0 === o ? {} : o,
						s = r.categories,
						c = void 0 === s ? {} : s,
						u = a.monitor_level;
					e.push({ name: i, metrics: a, categories: c }),
						e.length >= 20 || u >= K.error
							? n()
							: t ||
							(t = setTimeout(function () {
								n();
							}, 4e3));
				},
				log: function (e) { }
			});
		we.setup(r);
	})(),
		window.dispatchEvent(new CustomEvent("WebViewJSBridgeReady"));
	let ta = { biz: fn, device: gn, appCenter: yn };
	Mn(ta, An);
	let na,
		ra,
		ia,
		oa = null,
		aa = [];
	if (((window.ttJSBridge = null), g.versions.mobileFeishu || g.versions.PCFeishu)) {
		(ia = null == $o ? void 0 : $o.updateMeta)(),
			new MutationObserver(function (e) {
				(function (e) {
					for (var t = !1, n = 0; n < e.length; n++) {
						let r = e[0];
						if ("childList" === r.type) {
							var i, o;
							if (null != (i = r.addedNodes) && i.length) {
								let a = ea(r.addedNodes);
								if (((t = a), a)) break;
							}
							if (null != (o = r.removedNodes) && o.length) {
								let s = ea(r.removedNodes);
								if (((t = s), s)) break;
							}
						}
						if ("attributes" === r.type && "META" === r.target.nodeName && r.target.hasAttribute("lk-config")) {
							t = !0;
							break;
						}
					}
					return t;
				})(e) && ia();
			}).observe(document.head, {
				childList: !0,
				attributes: !0,
				subtree: !0,
				attributeFilter: ["name", "content", "lk-config"]
			});
		var sa = {
			setConfig: function (e) {
				Object.assign(En, e);
			},
			config: function (e) {
				let t = { appId: e.appId, timestamp: e.timestamp, nonceStr: e.nonceStr, signature: e.signature, jsApiList: e.jsApiList };
				return (
					(function (e) {
						e;
					})(e.appId),
					(oa = new Promise(
						r(
							a.mark(function n(r, i) {
								return a.wrap(function (n) {
									for (; ;)
										switch ((n.prev = n.next)) {
											case 0:
												"string" == typeof g.versions.larkVersion && w(g.versions.larkVersion, "3.9.0") >= 0
													? an.invoke("config", t, {
														onSuccess: function (t) {
															r(t), "function" == typeof e.onSuccess && e.onSuccess(t);
														},
														onFail: function (t) {
															i(t),
																"function" == typeof e.onFail && aa.push(e.onFail),
																aa.forEach(function (e) {
																	"function" == typeof e && e(t);
																});
														}
													})
													: r();
											case 1:
											case "end":
												return n.stop();
										}
								}, n);
							})
						)
					))
				);
			},
			ready:
				((ra = r(
					a.mark(function e(t) {
						return a.wrap(
							function (e) {
								for (; ;)
									switch ((e.prev = e.next)) {
										case 0:
											return (e.prev = 0), (e.next = 3), Sn({ api: ta, browser: g, build: "cdn", SDK: sa });
										case 3:
											e.next = 8;
											break;
										case 5:
											(e.prev = 5), (e.t0 = e.catch(0)), k(null == e.t0 ? void 0 : e.t0.message, !0);
										case 8:
											if (!oa) {
												e.next = 18;
												break;
											}
											return (e.prev = 9), (e.next = 12), oa;
										case 12:
											e.next = 16;
											break;
										case 14:
											(e.prev = 14), (e.t1 = e.catch(9));
										case 16:
											e.next = 19;
											break;
										case 18:
											k("please invoke h5sdk.config before invoke h5sdk.ready，otherwise the interface call may fail", !0);
										case 19:
											t();
										case 20:
										case "end":
											return e.stop();
									}
							},
							e,
							null,
							[
								[0, 5],
								[9, 14]
							]
						);
					})
				)),
					function (e) {
						return ra.apply(this, arguments);
					}),
			error:
				((na = r(
					a.mark(function e(t) {
						return a.wrap(function (e) {
							for (; ;)
								switch ((e.prev = e.next)) {
									case 0:
										aa.push(t);
									case 1:
									case "end":
										return e.stop();
								}
						}, e);
					})
				)),
					function (e) {
						return na.apply(this, arguments);
					}),
			updateMeta: function () {
				null == $o || $o.updateMeta();
			}
		};
		Sn({ api: ta, browser: g, build: "cdn", SDK: sa }),
			window.lark ? Object.assign(window.lark, sa) : (window.lark = sa),
			window.h5sdk ? Object.assign(window.h5sdk, sa) : (window.h5sdk = sa),
			window.tt ? Object.assign(window.tt, $o) : (window.tt = $o),
			(window.ttJSBridge = sn);
	}
});
